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

Search Console Product Error for google

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 “aggregateRating” 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 number of 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 “aggregateRating” 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.

schema validation structure google

First let me explain what Structured Data & Schema is, why you need it 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 “aggregateRating” 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 help 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. In fact 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 no luck. If you don’t have basic WordPress css knowledge, it’s best you stay out of your functions.php file because if you make a mistake and remove the wrong piece of code or a 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 “aggregateRating” should be specified” below.

****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”: “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>


Comments

  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.

    • Patricia L Johnson : December 12, 2019 at 10:58 pm

      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!

    • Patricia L Johnson : July 16, 2020 at 2:41 am

      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.

  5. smore traiolit : May 4, 2020 at 6:21 am

    I very pleased to find this website on bing, just what I was looking for : D too saved to fav.

  6. Do you have a method that will work for standard HTML sites (i.e., NOT a WordPress site)?

    • Patricia L Johnson : May 24, 2020 at 10:40 am

      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?

  7. Thanks.

  8. 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

    • Patricia L Johnson : July 16, 2020 at 2:47 am

      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

Your email address will not be published. Required fields are marked *

NEVER give up on your dreams!

"12 Things I've Learrned As A Small Business Owner During This 2020 Pandemic."

The world as we know it is drastically changing and you gotta be prepared. 
DOWNLOAD NOW