Skip to content

Instantly share code, notes, and snippets.

@hivepress
Last active February 20, 2023 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hivepress/2ff5fcf2256464a1f7829fb69ff563ce to your computer and use it in GitHub Desktop.
Save hivepress/2ff5fcf2256464a1f7829fb69ff563ce to your computer and use it in GitHub Desktop.
Remove the text field from reviews #hivepress #reviews
<?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