It turns out this situation.
The star rating is displayed on almost all products, although no one has left reviews or made ratings.
How is it possible to reset / reset the rating so that the stars disappear for products that no one has rated?
It turns out this situation.
The star rating is displayed on almost all products, although no one has left reviews or made ratings.
How is it possible to reset / reset the rating so that the stars disappear for products that no one has rated?
Are you sure that the scripts correctly display the rating? Check the output of the script for those products in which you doubt. Look at the database, what records are in it for this product.
It is possible that this is a script-level error. For example, when a rating calculation formula gives an incorrect rating in the absence of data.
Look from where and how the "stars / rating" is displayed, for example, on the pages:
Perhaps the code is inserted for beauty as HTML and it will just need to be deleted.
Just look at the possibilities and settings of the topic, read the documentation for the topic (if any).
If the rating is derived from the database table, you can reset the data via a SQL query:
UPDATE `wp_postmeta` SET meta_value='0' WHERE meta_value > 0 and meta_key = '_wc_average_rating'; UPDATE `wp_commentmeta` SET meta_value='0' WHERE meta_value > 0 and meta_key='rating' Or you can try the plugin YITH WooCommerce Advanced Reviews
Source: https://ru.stackoverflow.com/questions/667093/
All Articles