Tagged: Star rating
How can I add star ratings under ‘Add to Cart’ button. Below is the screenshot.
You can try to add following code to functions.php (at the very bottom):
add_filter( 'woocommerce_after_add_to_cart_button', 'ino_add_rating_stars' );
You can also try to use the woocommerce_after_add_to_cart_button instead of the woocommerce_before_add_to_cart_button hook.
Thanks! The code still not working. Now it doesn’t color the stars based on previous reviews.
Please see below screenshot.
My mistake – I used the code for the single star rating. I adjusted the code and it will display the average rating now.
The topic ‘Product page star rating under cart button’ is closed to new replies.