Free Directory, Listing & Classifieds WordPress Plugin 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?

    ihordeveloper

    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.

Subscribe

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.