I’m working on custom layouts for WC single product pages, and have come to the customer reviews section.
I have set a condition on the section to only display if the product has reviews.
But, I would also like to add a secondary “AND” condition that checks if product reviews are enabled globally in the Woocommerce settings.
So, display if:
- Product has reviews AND 2. Product reviews are currently enabled
Maybe I’m missing something but I can’t see this option.
I can see there is a function called wc_review_ratings_enabled() that I could use, but before I go down that route I thought I’d ask the question here.
Thanks!


