I have been investigating further, and found that in structured data, the schema is generating two properties together such as offer.price and offer.priceSpecification. This contradicts Google: https://developers.google.com/search/docs/appearance/structured-data/product#pricing-example
As you can see from above article, a price can be provided only in one place, either at the Offer level or inside the priceSpecification property.`
I appear to be having the same issue.
Google have removed my store from Free Listings.
I believe it is because Offers are displayed on Schema, and Google require one set price to be displayed.
My product doesn’t have any offers but it being detected as having one.
Invalid value in field priceSpecification (in offers)
“offers”:[{“@type”:”Offer”,”price”:”10.00″,”priceValidUntil”:”2023-12-31″,”priceSpecification”:{“price”:”10.00″,”priceCurrency”:”USD”,”valueAddedTaxIncluded”:”true”},
Is there any way to remove the offer schema?
-
This reply was modified 6 months, 1 week ago by
sityware.
@djwilko12
You might want to check this file out
/html/wp-content/plugins/woocommerce/includes/class-wc-structured-data.php
I’ve removed the second price from priceSpecification , around line 253 on mine as a workaround.
Just waiting to see if this resolves it with Google.
Hi @sityware
Thanks for your reply. I think im gonna wait a little bit more to receive the official reply from Yoast with a solution. I dont want to change the code of the plugin and maybe have some other features affected, that could be worse.
Why you think they are adding PriceSpecification type schema? We already have the offer type schema that is enough… These 2 are generating conflict.
Thanks
Same problem. all my products have been flagged as invalid in search console for Merchant listings because of a priceSpecification error. Advice on how to resolve this is appreciated. Rich results test here.
As a workaround I have removed the whole priceSpecification section around line 250
/html/wp-content/plugins/woocommerce/includes/class-wc-structured-data.php
'priceSpecification' => array(
'price' => wc_format_decimal( $product->get_price(), wc_get_price_decimals() ),
'priceCurrency' => $currency,
'valueAddedTaxIncluded' => wc_prices_include_tax() ? 'true' : 'false',
),
Google has started validating your fix of structured data issues on your site. Specifically, we are checking for ‘Invalid value in field ‘priceSpecification’ (in ‘offers’)’, which currently affects 1 pages.
-
This reply was modified 6 months ago by
sityware.
-
This reply was modified 6 months ago by
sityware.
Is it woocommerce generating the schema or yoast??
This looks to be Woocommerce,
Google Search index now sees my product page as valid now after removing the priceSpecification section.
Just waiting on Merchant side to review it seems as well.
@dtayl20
I removed the whole section it at lines 230, 252, 470, and 504 without any improvement. When validating in search console, it still fails. Inside the page I still see:
"priceSpecification":{"@type":"PriceSpecification","valueAddedTaxIncluded":false}}
In the resulting pages.
The script tags surrounding it are as follows:
<script type="application/ld+json" class="yoast-schema-graph yoast-schema-graph--woo yoast-schema-graph--footer">
This leads me to believe that YOAST is generating this, not woocommerce.
I am also getting Invalid object type for field “brand”
This is definitely a Yoast issue. I saw a few other comments about this (on other SEO plugin pages) that were resolved by a patch from the creator. As a test, I deleted all Yoast products and the problem (priceSpecification and brand) vanished.
I now have only non-critical error, which is:
No global identifier provided (e.g., gtin, brand) (optional)
If course, this also screws up listings.
Hello All,
We are sorry it took a while to get a response. Indeed, Google recently updated its specification for a bunch of eCommerce schema, which is now causing a few errors in Google Search Console and the Rich Result Test tool that didn’t occur before.
On the 20th of September, we released an enhancement in our WooCommerce add-on that improves the Schema output for offers
and priceSpecification
to match Google’s recent changes to their guidelines.
Please update and let us know if the issue persists.
Hi @maybellyne thanks for the reply. I have few questions:
1- the only way to fix this currently is having your Woocommerce paid add-on?
2- won’t you offer a solution for the community plugin?
3- what does exactly do the updated add-on for fixing this issue?
Thanks
I forgot to come back and update this thread. As @maybellyne said the patch (plus clearing cache) did resolve the issue.
@djwilko12 – I’m not 100% certain, but don’t believe this schema is applied unless you have the Yoast WooCommerce SEO plugin installed.
@pldoolittle Thanks for confirming the new release resolved the issue for you
@djwilko12 offers
and priceSpecification
are output by WooCommerce and not Yoast SEO. As such, you will need our WooCommerce SEO add-on. This forum is reserved for supporting the free version of Yoast SEO. As this topic is about a premium add-on, this thread has been marked as resolved per the forum guidelines.
Please contact our support team for assistance if you have an active premium subscription. How can I get premium support?