Hi again,
I have some trouble with the edit of the listing, i simply want to desable the edit of the listing, becous it seams that the information before editing getting lost, so a use can change the information of the listing just before the sell.
So i would like to know if there is an easy way to block the user from editing his listing completly.
even with the moderator feedback before validating edit, the value still be change and i can’t see the original value befor editing so …
i tryed to use this snippet but it doesn’t work:
add_filter('hivepress/v1/forms/listing', 'disable_listing_edit', 10, 2);
function disable_listing_edit($form, $args) {
$current_user_id = get_current_user_id();
$listing_author_id = hp\get_user_id($args['listing_author']);
if ($current_user_id === $listing_author_id) {
$form = [];
}
return $form;
}
I realy need some help for this, because it can easly break all my website if it still like that…