Rate a listing without write a review

Hey there,
I’m not sure if there’s an option that allows users to simply give a rating to a listing without having to write a review. Right now, when a user wants to rate a listing, they have to write something in the review section as well.

Hi, currently there is only reviews, not ratings only. It requires customization.

Hi,

Please check this topic Remove text area in reviews.

​I hope this is helpful to you.

1 Like

Below is the code snippet that resolved my problem:

add_filter(
    'hivepress/v1/forms/review_submit',
    function( $form ) {
        // Keep the text field but make it optional
        $form['fields']['text']['required'] = false;

        return $form;
    },
    1000
);

add_filter(
    'hivepress/v1/models/review',
    function ( $model ) {
        // Make sure the text field is not marked as required
        $model['fields']['text']['required'] = false;

        return $model;
    },
    1000
);

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.