Hi,
We have used below code in our child theme. We found this code on Themeco’s Forum
remove_action( 'woocommerce_single_product_summary',
'woocommerce_template_single_rating', 10 );
add_action( 'woocommerce_single_product_summary',
'my_woocommerce_template_single_rating', 10 );
function my_woocommerce_template_single_rating() {
global $product;
if ( $product->post->comment_status === 'open' )
wc_get_template( 'single-product/rating.php' );
return true;
}
With above code we are able to show star rating in the single product page that has been reviewed (Rated) by customer. The issue is that the rating’s link is not working (The link doesn’t scroll to the review tabs section of the product page). You can see the issue via below link.
https://www.hamroshringar.com/product/pax-moly-dr-jk1-sun-screen-lotion-face-body-200-ml/
Also we want to show this rating and link to every product page even if the product is not reviewed or rated by the customers.
Hoping for the response.
Thank you and best regards.
Bibhash Karn