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 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can try using this snippet and also an extra one for the
hivepress/v1/forms/listing_update
hook tounset($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.