D
D
DMax9212019-03-25 19:59:32
WooCommerce
DMax921, 2019-03-25 19:59:32

What is this error in WOO Set a value for one of the following data elements: "offers", "review", or "aggregateRating".?

Hello, friends!
The third day I study information on errors in the Google console
Set a value for one of the following data elements: "offers", "review" or "aggregateRating".
Plugins installed:
Yoast SEO Premium 10.0.1
Yoast SEO: WooCommerce 10.0
Schema - All In One Schema Rich Snippets 1.5.6
google console complains about products in the category.
Displayed products in a category do not have one of the following data elements: "offers", "review", or "aggregateRating".
And because of this, 555 products hang like an error.
Help solve the problem please...

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Maxim Demidov, 2019-03-25
@DMax921

Read here - https://www.checkerboard.com/web-development/fix-o... there is just about it.
The author suggests adding code

**
 * 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' );

M
metallix, 2019-03-25
@metallix

How to fix "Specify a value for one of the following...

S
Sergey, 2021-05-16
@kurul86

Good day.
I read your question, but before that I "rummaged through the entire space of the Internet" and unfortunately nothing came of it (((
But ...
When I clearly began to delve into the essence, I realized one thing that the Google console gives an error on the pages of product categories and tags (tags) of the product.
That is, Google sees these pages as a separate product and, accordingly, there is no price, no reviews, in short, nothing from what is needed for the product page.
I installed the Rank Math SEO plugin and in the metadata settings there is under the settings for product categories and product tags, and there is a checkbox "Delete data from snippet (Delete schema markup data from Category (Label))" and everything worked fine.
I'm not a coder, just the owner of an online store, I don't know where and what and how to prescribe. This method helped me and I hope it will help someone else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question