This error showed up in my Google Console.
Either “offers”, “review”, or “aggregateRating” should be specified, on 90% of my pages!
This is a new error that google in now showing dating from beginning of March. Google is now showing more errors to users to help them with there sight. Previously they were hidden, but were still errors.
I found a snippet of code that will prevent this error from showing. I tried this in a website that was showing these errors and after 3 days the Google Console was clear from errors. So this code definitely works.
Add this to your functions.php file.
1 2 3 4 5 6 7 8 9 |
/** * Remove the generated product schema markup from Product Category and Shop pages. */ function wc_remove_product_schema_product_archive() { remove_action( 'woocommerce_shop_loop', array( WC()->structured_data, 'generate_product_data' ), 10, 0 ); } add_action( 'woocommerce_init', 'wc_remove_product_schema_product_archive' ); |
This code was applied to a site that had 238 errors, after 15 days it was down to 17 errors. Google takes its time to validate.
10th Feb was showing 238 errors
By the 25th February it was only showing 17, so this code does work!