Last active
February 20, 2023 20:13
-
-
Save hivepress/2ff5fcf2256464a1f7829fb69ff563ce to your computer and use it in GitHub Desktop.
Remove the text field from reviews #hivepress #reviews
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/forms/review_submit', | |
function( $form ) { | |
unset( $form['fields']['text'] ); | |
return $form; | |
}, | |
1000 | |
); | |
add_filter( | |
'hivepress/v1/models/review', | |
function ( $model ) { | |
$model['fields']['text']['required'] = false; | |
return $fields; | |
}, | |
1000 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment