Last active
July 16, 2024 11:29
-
-
Save hivepress/c022e11f115836083afd426ef6e8dddf to your computer and use it in GitHub Desktop.
Make the listing description field optional #hivepress #listings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( | |
'hivepress/v1/models/listing', | |
function( $form ) { | |
$form['fields']['description']['required'] = false; | |
return $form; | |
}, | |
1000 | |
); |
You can try using this snippet and also an extra one for the hivepress/v1/forms/listing_update
hook to unset($form['fields']['description'])
, then the description should be not required and hidden.
You can also check another snippet which makes the description moderated, then any changes will send the listing to Pending status.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to hide the default description box for the listing, as it is not possible to make any changes made in the description area by customer to be manually approved by admin. So any way I can hide the listing description box so that it does not show when uploading or editing the listing.?