How to Fix Either “offers”, “review”, or “aggregateRating” (search console)
-
Hello,
Last night I received 3 search console issues, ( “offercount” “review” “aggregateRating”) and and found some sort of code resolution but I do not know how to implement this. Has anyone solved this problem? How do you resolve this?
I found this link, but I don’t know if this snippet is ok : https://www.checkerboard.com/web-development/fix-offers-review-aggregaterating-specified/
in there say :
To do that, you’ll want to add the following code to your theme’s functions.php file:
/**
* 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’ );
Hello,
Personally, we didn’t use this fix before and can’t guarantee that it will work as you expected. To make it work, you can add it to the functions.php
file in your child theme folder.
Kind Regards