The common way to create Schema markup for WooCommerce product variations in the past has been to create multiple Schema offers for a product – one offer per variation. Unfortunately, the Google merchant crawler has always been very unreliable when reading offers, sometimes being able to read product offers, and sometimes not. Even now, after Google added merchant validation to their Rich Results Test tool, it does not guarantee that the Google merchant crawler will be able to read Schema markup as predicted by Google’s test tool.
Some structured data plugins have attempted to work around the limitations of Google merchant’s crawler by offering different Schema markup when query arguments for variation attributes are present in the URL. WooCommerce creates a single webpage for a product (like WordPress does for a single Post or Page), and javascript is used to adjust the information displayed based on URL query arguments for variation attributes – but there still is only one singular HTML webpage for a product. Some structured data plugins break this single product webpage by adjusting the Schema markup to include only the variation offer when URL query arguments are present. This has some serious drawbacks as the WooCommerce product webpage can no longer be cached, the canonical URL value is now invalid (ie. points to the main product page, which has different markup), and search engines traditionally ignore query arguments, which means they are seeing different markup for the same URLs. Breaking the WooCommerce product webpage might help fix Google merchant’s limitations, but it does so at the expense of search engine ranking.
So, how do we preserve the single webpage for a WooCommerce product with variations?