Home Support Extensions Reviews Hello, how can I make the ratings a non-mandatory item?

Hello, how can I make the ratings a non-mandatory item?

  • Author
    Posts
  • shenei

    I am using the ratings section as a comments section, but the star ratings that appear are required, how could I make it a non-mandatory item?

    ihor developer

    This code snippet should do it, but please note that the stars may be displayed anyway:

    add_filter(
    	'hivepress/v1/models/review',
    	function( $model ) {
    		$model['fields']['rating']['required'] = false;
    
    		return $model;
    	}
    );
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.