Thanks for finally updating structured data handling on Woocommerce.
There is still one bug remaining:
- If an admin responds to comment, that comment will get a rating of 0. Structured data handling in X creates a “regular comment” from that by appending the response to the actual comment structured data. This results in Google reporting a structured data error as a review with a “0” rating is not valid.
It seems that you (still) roll your own here? Why don’t you use the perfectly capable structured data handling module in Woocommerce that does handle (also this) condition correctly.
The correct way here should be to NOT build structured data for responses with no rating.