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.

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!!

Leave a Reply

Your email address will not be published.