Disable review rating
I want to disable the review rating but keep the reviews on my site. I tried using a filter hook in my child theme function.php
Code:
function noReviewRating() {
if ( jQuery('input[name="review_rating"]').val().length < 6 ) {
form.submit();
} else {
jQuery('#review-rating').after('<label for="review_rating" generated="true" class="error rating-error" style="display: block; ">The rating is required.</label>');
return false;
}
}
add_filter('ensureReviewRating','noReviewRating');
This didn't seem to have any effect. When I put that code in it is exactly the same as when it isn't in the functions.php. When I change the original function in Vantage I get a different message on a new page that says "You forgot to choose a rating." So it seems as thought the filter hook isn't actually filtering the function + there is obviously something else I need to change to make it work.
Has anybody else managed this?