How To Fix Schema Validation Error "Product Offers, Review or AggregateRating"

How To Fix Schema Validation Error “Product Offers, Review or AggregateRating”

JSON Schema Validator Correction

Have you received this email from Google, “Google has started validating your fix of Products issues on your site. Specifically, we are checking for ‘Either “offers”, “review”, or “aggregate rating” should be specified’, which currently affects 327 pages.”

“Validation can take a few days; we will send you a message when the process is complete. You can monitor the progress of the test by following the link below.”

Top 5 new issues found, ordered by several affected pages:

Or maybe you have seen this notice in your Google Search Console when you clicked on your product tab “Either “offers”, “review”, or “aggregate rating” should be specified?” It scared the heck out of you, didn’t it? Well, you are not alone. Thousands are affected by this. But don’t worry. I will show you how to fix this and get rid of that error. The issue is a Schema Validation Error, which arrived from your Structured Data & Schema.

 

First let me explain what Structured Data & Schema is, why you need them and why all errors should be fixed. “Structured data adds context to your website content by way of using standardized search engine “vocabulary” at Schema.org. When implemented correctly, structured data increases the chances that search engines like Google will show additional information about your content directly in the search engine results pages (aka SERPs) via “rich snippets”. It helps your Woocommerce Products stand out more and rank better. If there is an error with your schema data, it can affect your rankings. So what can you do? Well, I have the correct structural code set up, tried, and tested, with no errors.

***If you want to know how to fix more website errors, go to Smazzit WordPress Support

NOTE: Schema Validation Warnings DOES NOT affect your website. You can fix them if you want, but it’s no big deal.

Now before I post the correct structural code, I do want to touch on a post from Checkerboard on How To Fix “Either “offers”, “review”, or “aggregate rating” should be specified.”

According to Checkerboard, this code should be entered in your functions.php file to help fix this error. But Checkerboard also states this only helps if you are getting the error on your product category pages.

/** * 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’ );

Well, this does NOT work for every site so be careful. It may work for some, but it did not work on any of the websites I tested using the code. I received code errors after entering it on a few of my websites.  Live strange code was displayed on the front of the website. That’s not good. I tested this on three different sites and had no luck. If you don’t have basic WordPress CSS knowledge, you should stay out of your functions.php file because if you make a mistake and remove the wrong piece of code or closure or leave a space where it shouldn’t be, it’s going to be a long day. Your WordPress screen will go white, so just don’t go in there unless you know what you are doing or have a WordPress Developer on stand-by.

This is the correct Schema Structure that will fix Either “offers”, “review”, or “aggregate rating” should be specified” below.

UPDATED SCHEMA VALIDATION CODE FOR Product Offers, Review, or AggregateRating (2022)

The new code help fix Google Product Warnings, including Brand and MPN warnings in Google Search Console

 

****IMPORTANT! PLEASE MAKE SURE YOU HAVE SOME REVIEWS ON YOUR PRODUCTS BEFORE RE-ADDING THE CODE.

PLEASE REPLACE THE DUMMY DATA WITH YOUR REAL SCHEMA DATA (rating value, review count, description, name, image, availability URL, and your customer reviews)!

 

 

<script type=”application/ld+json”>

{

“@context”: “https://schema.org/”,

“@type”: “Product”,

“name”: “Dummy Title”,

“image”: [

“https://www.sample.com/wp-content/uploads/2018/08/s1.jpg”

],

“description”: “This description is only a dummy description so replace with your own”,

“sku”: “None”,

“mpn”: “None”,

“brand”: {

“@type”: “Brand”,

“name”: “Dummy Name”

},

“review”: {

“@type”: “Review”,

“reviewRating”: {

“@type”: “Rating”,

“ratingValue”: “5”,

“bestRating”: “5”

},

“author”: {

“@type”: “Person”,

“name”: “A. Angie”

}

},

“aggregateRating”: {

“@type”: “AggregateRating”,

“ratingValue”: “5.0”,

“reviewCount”: “35”

},

“offers”: {

“@type”: “AggregateOffer”,

“offerCount”: “5”,

“lowPrice”: “3.99”,

“highPrice”: “33.99”,

“priceCurrency”: “USD”

}

}

</script>

 

 

Old Schema Validation Code but it still works~

 

<script type=”application/ld+json”>

{

“@context”: “http://schema.org”,

“@type”: “Product”,

“aggregateRating”: {

“@type”: “AggregateRating”,

“ratingValue”: “5.0”,

“reviewCount”: “28”

},

“description”: “Low cost fabulous boots”,

“name”: “Work Boots”,

“image”: “https://www.sampleimageofproduct.com/wp-content/uploads/2015/02/boots.jpg “,

“offers”: {

“@type”: “Offer”,

“availability”: “https://www.example.com”,

“price”: “23.99”,

“priceCurrency”: “USD”

},

“review”: [

{

“@type”: “Review”,

“author”: “Joan”,

“datePublished”: “2019-10-21”,

“description”: “Nice shirt!

.”,

“name”: “Branded T-Shirt”,

“reviewRating”: {

“@type”: “Rating”,

“bestRating”: “5”,

“ratingValue”: “5”,

“worstRating”: “5”

}

},

{

“@type”: “Review”,

“author”: “Becky”,

“datePublished”: “2019-05-22”,

“description”: “This shirt makes me feel smart.”,

“name”: “Unique T Shirt”,

“reviewRating”: {

“@type”: “Rating”,

“bestRating”: “5”,

“ratingValue”: “5”,

“worstRating”: “5”

}

}

]

}

</script>

UPDATE: 03/23/2022

THIS SCHEMA CAN ALSO BE USED AS WELL

<script type=”application/ld+json”>
{
“@context”: “https://schema.org”,
“@type”: “Product”,
“aggregateRating”: {
“@type”: “AggregateRating”,
“ratingValue”: “5.0”,
“reviewCount”: “2”
},
“description”: “Description of our services”,
“name”: “My Best Services”,
“image”: “How To Fix Schema Validation Error &quot;Product Offers,Review or AggregateRating&quot;  “,
“offers”: {
“@type”: “Offer”,
“availability”: “https://schema.org/InStock”,
“price”: “10.00”,
“priceCurrency”: “USD”
},
“review”: [
{
“@type”: “Review”,
“author”: “Nancy Loaf”,
“datePublished”: “2021-02-21”,
“reviewBody”: “I love the awesome service I received from this company. “,
“reviewRating”: {
“@type”: “Rating”,
“bestRating”: “5”,
“ratingValue”: “4”,
“worstRating”: “1”
}
},
{
“@type”: “Review”,
“author”: “Tommy Soul”,
“datePublished”: “2021-001-12”,
“reviewBody”: “I am glad I spent my money with you “,
“name”: “Value purchase”,
“reviewRating”: {
“@type”: “Rating”,
“bestRating”: “5”,
“ratingValue”: “5”,
“worstRating”: “1”
}
}
]
}
</script>

 

 

17 thoughts on “How To Fix Schema Validation Error “Product Offers, Review or AggregateRating””

  1. I had this problem with my website, and I had to wait for ages to get Google Validation, it’s a big source for frustration. Thank you so much for your explanation.

  2. THANK YOU! I have been trying to figure out what was going on with my site and Google for the last 2 days. I have hardly slept. It is my main source of income so it is imperative that things like this get sorted out FAST. This is the first article I found that actually explains what is happening, why it happened, and how to fix it!!

  3. He thanks you for your article. I get this error for all my 3 products. Do I need to do this for each individual product and how do i upload it individually? Also, i have a WP Seo Schema plugin on do i need to disable this?
    Thanks in advance.

    1. Patricia L Johnson

      Hello Quinty, I apologize for the late reply. That code goes in your html section of your website when you are marking up schema code manually. In the example, it shows you a product or course or thing being marked up with the reviews and how it should look before you paste it in your section. Now if we are talking about your website I see in the link, I don’t see those errors. I only see a few warnings. And warnings are ok, which is why Google say “should consider fixing.” I used the Google Data Structured too to run a check on your website in the link. Let me know if you need more assistance.

  4. Hi, I know this is an old post and I am late to the party. I just launched a site and am just seeing these errors. What happens if I don’t have any reviews yet, can I still apply these solutions and solve the problems? Or reviews and ratings must be in place before the solution can work? And again, is there a plugin that I can use to insert the codes. I am no developer and I don’t want to mess around with the code. Thank you!

    1. Patricia L Johnson

      Hello Patrick, I apologize for the late reply. I hope you got it resolved. Yes you definitely need some reviews on at least one of your products or the error will remain.

    1. Patricia L Johnson

      Hello Paul, are you getting this error because usually it usually happens when you are using the Woocommerce Plugin for WordPress and Google Schema Structured Data in your head section of your website?

  5. Hello, thanks for your post and your wonderful explanation. I have a few products on my site and I am using Woocommerce. I did not find the Google Schema Structured Data in my head section, but maybe I am looking at the wrong place. So, where do I put your code exactly. I did not find a way to access html product code in Woocommerce and the SHOP page lists all products. So I am lost here. Can you please explain.
    Thanks

    1. Patricia L Johnson

      Hello Mike, I apologize for the late response. Did you get the problem resolved? Are you using WordPress also? If you don’t have the code in your head section, maybe you are using that setting in one of your plugins and you have no reviews. Am I correct?

Leave a Reply to Patricia L Johnson Cancel Reply

Scroll to Top
Scroll to Top