Better Schema for WooCommerce

WooCommerce is a popular e-commerce plugin that offers a lot of flexibility, with a solid and well designed codebase.

The WooCommerce plugin is not an SEO plugin or a social sharing plugin, so its Schema markup for search engines and social sites is minimal - and its social meta tags for Facebook, Twitter, and other social sites are non-existent.

You may have found your way to this webpage after sharing a WooCommerce product page on Facebook, Pinterest or other social sites - or maybe testing a product page using the Google Rich Results Test Tool or the Google Structured Data Test Tool - and being unimpressed with the default markup from WooCommerce. The following guide provides a quick and easy way to improve how your WooCommerce products look when displayed in search results and shared on social sites. Having error-free, complete and accurate Schema markup will definitely improve your Google search ranking - significantly in some instances. :)

Common Warnings for WooCommerce Markup

The Google Rich Results Test Tool, the Google Structured Data Test Tool, or the Google Search Console for site owners, may report one or more of the following errors for the default Schema markup offered by WooCommerce:

  • The aggregateRating field is recommended.
  • The brand field is recommended.
  • The review field is recommended.
  • This Product is missing a global identifier (e.g. isbn, mpn or gtin8).
  • No global identifier provided (e.g. gtin mpn isbn).

The aggregateRating warning from WooCommerce's Schema markup can be addressed by having your customers leave one or more reviews for each of your products. Unfortunately, products without any reviews will not have an aggregateRating value (see bellow for a solution).

If your product has several reviews, WooCommerce will only include the last review in the Schema Product markup, which may not reflect the aggregateRating values - which are calculated from all reviews, not just the last one (see bellow for a solution).

All product reviews (ie. that have a rating value) and comments (ie. that do not rating value) are combined by WooCommerce into a separate, disconnected Schema JSON-LD block for reviews, no matter if a review or comment has a rating value or not (see bellow for a solution).

The following values should be included in the Schema markup when available, but WooCommerce cannot manage this information without using 3rd party plugins and coding complex filters for its Schema markup (see bellow for a solution).

  • Brand
  • GTIN-14
  • GTIN-13 (aka UPC)
  • GTIN-12 (aka EAN)
  • GTIN-8
  • ISBN
  • MPN (aka Manufacturer Part Number)

Although Google does not complain about the lack of a mainEntity or mainEntityOfPage value, this property should be included to make sure Google recognizes the Schema Product markup as the main content of the webpage.

WPSSO - An Easy Solution for Better Schema

The combination of the WPSSO Core Premium plugin and its WPSSO Schema JSON-LD Markup add-on (Standard or Premium) addresses all the Schema markup weaknesses from WooCommerce, and includes many more Schema product properties for Google - not to mention complete social meta tags for Facebook, LinkedIn, Pinterest, Twitter, and more. ;-)

WPSSO offers an option to include aggregateRating and review properties for all your products, even if they do not have any reviews - and if your products have reviews (ie. with a star rating) and comments (ie. no rating value), they will be classified properly - added to the Schema Product markup as "reviews" and "comments" respectfully.

WooCommerce provides only a single product offer in its Schema markup - even for variable products with different pricing - while WPSSO includes all product variation offers, grouped by currency, with complete product details for each offer (description, image, mpn, sku, gtin, item condition, availability, price, currency, VAT added, etc.).

WPSSO includes product prices without VAT (by default) or can optionally include VAT in the offer prices. WPSSO also includes the WooCommerce product and variation image, weight, width, height, and length values for each offer.

WPSSO supports many additional WooCommerce product and variation attributes as well, including:

  • Brand
  • Color
  • Condition (possible values: Damaged, New, Refurbished, or Used)
  • Depth
  • GTIN-14
  • GTIN-13 (aka UPC)
  • GTIN-12 (aka EAN)
  • GTIN-8
  • GTIN
  • ISBN
  • Material
  • MPN (aka Manufacturer Part Number)
  • Size
  • Gender
  • Volume

See the WooCommerce integration notes for details on different ways you can include this product information in your WooCommerce shop (ie. using an add-on for WPSSO Core, a supported 3rd party plugin, WooCommerce Product Attributes, WordPress Custom Fields, or customized values in a Document SSO metabox).

A Step-by-Step Solution

  1. Install and activate the WPSSO Core plugin to manage and customize your webpage information for social sites and search engines.

    • From your WordPress site's Plugins > Add New page, search for "WPSSO Core".
  2. Install and activate the WPSSO Schema JSON-LD Markup add-on to provide Google with Schema markup in its preferred format.

    • From your WordPress site's Plugins > Add New page, search for "WPSSO JSON".
  3. Optionally install and activate the WPSSO Product Metadata for WooCommerce add-on to manage GTIN, GTIN-8, GTIN-12 (UPC), GTIN-13 (EAN), GTIN-14, ISBN, MPN, Depth, and Volume product information in WooCommerce.

    • From your WordPress site's Plugins > Add New page, search for "WPSSO WCMD".
  4. Optionally install and activate the WPSSO Schema Breadcrumbs Markup add-on (recommended).

    • From your WordPress site's Plugins > Add New page, search for "WPSSO BC".
  5. Optionally install and activate the WPSSO Tune WP Image Editors add-on to improve the quality of your WordPress social and search images.

    • From your WordPress site's Plugins > Add New page, search for "WPSSO TIE".
  6. To add support for WooCommerce products, other 3rd party plugins, service APIs, and advanced settings, purchase the WPSSO Core Premium plugin and follow the installation guide in the post-purchase email (the Premium version is provided as a simple plugin update).

  7. Have a look through your WordPress site's new SSO > Setup Guide page for possible setting suggestions.

  8. For information on managing additional WooCommerce product information, and optionally including VAT in product offer prices, see the WooCommerce integration notes.

  9. In case you have any questions or issues, you can also open a ticket on the Premium Support site.