How to manually change the rating of a review

If you want to display any other ratings than the one which is calculated, you can add the following snippet to the functions.php file of your theme or your child theme.

add_filter( 'wppr_rating', 'change_wppr_rating', 10, 3 );

function change_wppr_rating( $rating, $id, $model ) {
	if ( 762 == $id ) {
		return '8';
	}
	if ( 764 == $id ) {
		return '9';
	}
	return $rating;
}
        

This example is for id 762 & 764. You can change these according to the post ids of which you want to change the review.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us