Thread Starter
Paul_N
(@paul_n)
The problem seems to be with class-wc-comments.php
If I use the Woocommerce 2.2 version of this on my dev site the problem goes away.
Is there a fix needed here?
I can see that it is likely this code that is the reason:
/**
* Validate the comment ratings.
* @param array $comment_data
* @return array
*/
public static function check_comment_rating( $comment_data ) {
// If posting a comment (not trackback etc) and not logged in
if ( 'product' === get_post_type( $_POST['comment_post_ID'] ) && empty( $_POST['rating'] ) && '' === $comment_data['comment_type'] && 'yes' === get_option( 'woocommerce_review_rating_required' ) ) {
wp_die( __( 'Please rate the product.', 'woocommerce' ) );
exit;
}
return $comment_data;
}
/**
I’m wary of making any such change to my live site unless someone can confirm it will do no harm.
Thread Starter
Paul_N
(@paul_n)
I see that this behaviour is the result of this ‘fix’
https://github.com/woothemes/woocommerce/issues/7371
I’m not entirely sure I understand the need for this fix, one removes the ratings HTML and yet still requires that a rating be given? am I misunderstanding something here?
This code change stops admin’s ability to reply to a review, it requests that they supply a rating for their own product from within admin, which is impossible.
So at the moment my client cannot respond to any of their customer reviews from within admin.
Thread Starter
Paul_N
(@paul_n)