Hello! We’ve added a code snippet to moderate an ad after any attempt to edit it.
add_filter(
'hivepress/v1/forms/listing_update',
function( $form ) {
$form['fields']['title']['_moderated'] = true;
$form['fields']['description']['_moderated'] = true;
$form['fields']['images']['_moderated'] = true;
return $form;
}
);
But after adding this code, if the seller places an ad and the expiration date has come up, then it is hidden. Prior to adding this code, this ad was in the first position when resubmitted. Now, when re-submitted for moderation, it does not move to the first positions, but remains in the same place where it was in the list before hiding. And the dates are not updated. How to fix it?