webwitnl
Forum Replies Created
-
Forum: Plugins
In reply to: [Google for WooCommerce] Bug: variable products with no stock“So if I got it correctly, products that are not available are listed as available and some that are available are listed as Not available?”
No, only products that are not available are listed as available.
Log shows no errors, just that products are successfully committed. I have the latest versions of everything.
But are you sure you are appreciating the problem correctly? It is not a bug in submitted the products to google.
P.S. I tried Yoast Premium to see if they insert the schema.org JSON the right way for variations, but same thing. A google search stuff like people having the same problems two years ago, they would look into it, but still not fixed.
Basically, whether it is Woocommerce or Yoast who creates it, they should follow https://www.schemaapp.com/schema-markup/schema-org-variable-products-productmodels-offers/ , and instead of one offer under “offers”, they should have multiple for each variation, and move GTIN, availability etc. under the offer instead of the parent.
In defense of Google Listings & Ads, the plugin does it right, it’s that other plugins don’t. I probably need to go elsewhere and complain 😉
Oh well. It’s concerning that Woocommerce and plugins have so much trouble getting product variations right in 2022. I probably have to hook in somewhere and cook my own schema.
- This reply was modified 4 years, 2 months ago by webwitnl.
Forum: Plugins
In reply to: [Google for WooCommerce] Bug: variable products with no stockI’ve investigated a bit more, and I think the bug is elsewhere, in the schema.org JSON that wp-content/plugins/woocommerce/includes/class-wc-structured-data.php generates in my pages.
It’s probably that Google scrapes such a product page that they got from Google Listings & Ads, and then compares data.
class-wc-structured-data seems a bit lame, if you have a product with variations it only outputs one item instead of one for each variation. Then on line 262 it does this:
‘availability’ => ‘http://schema.org/’ . ( $product->is_in_stock() ? ‘InStock’ : ‘OutOfStock’ ),Function is_in_stock returns true if one variation is in stock but the others aren’t.
That JSON also doesn’t include GTIN and all your fields, so Google seems confused.