2. Stars always showing 5
The culprit was display: block !important on #reviews .commentlist .star-rating. WooCommerce’s rating widget works by: outer
has overflow: hidden + a ::before of 5 dim stars, and the inner is position: absolute with width: 80% clipping its own ::before of 5 gold stars. Setting display: block on the container collapsed its height and broke the absolute positioning clip — showing all 5 stars regardless of rating. Removed that line; the colour overrides still apply.
3. Duplicate comment raw wp_die page
Added the comment_duplicate_trigger action hook, which fires inside wp-comments-post.php before wp_die() is called — this lets us intercept early and redirect back to the product page with ?review_error=duplicate#review_form_wrapper. The existing wp_die_handler filter is kept as a fallback. The inline JS notice is already there to display a friendly styled message when that URL param is present.
Rated 4 out of 5
test2 (verified owner)–
4 star rating
Only logged in customers who have purchased this product may leave a review.
Mubeen Ali (verified owner) –
That’s an amazing product
Mubeen Ali (verified owner) –
Test review
Mubeen Ali (verified owner) –
test
Mubeen Ali (verified owner) –
testing….
Mubeen Ali (verified owner) –
3 star
Mubeen Ali (verified owner) –
sdfasdf
Mubeen Ali (verified owner) –
2. Stars always showing 5
The culprit was display: block !important on #reviews .commentlist .star-rating. WooCommerce’s rating widget works by: outer
3. Duplicate comment raw wp_die page
Added the comment_duplicate_trigger action hook, which fires inside wp-comments-post.php before wp_die() is called — this lets us intercept early and redirect back to the product page with ?review_error=duplicate#review_form_wrapper. The existing wp_die_handler filter is kept as a fallback. The inline JS notice is already there to display a friendly styled message when that URL param is present.
test2 (verified owner) –
4 star rating