Better Schema for WooCommerce

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

WooCommerce 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 and social sites - or maybe testing a product page using Google's Structured Data Testing Tool - and being unimpressed with the results. The following guide provides a quick and easy way to improve how your WooCommerce products look when shared on social sites and displayed in search results. Having more complete and accurate Schema markup will also improve your search ranking - significantly in some instances. :)

Common Warnings for WooCommerce Markup

Google's Structured Data Testing Tool and/or Google's Search Console for site owners may report the following errors for the default Schema JSON-LD 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.

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.

All product reviews (ie. have a star rating) and comments (ie. no 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.

One or more of the following values should be included in the Schema markup, but WooCommerce does not handle these product attributes by default, nor would it include them, even if you created these product attributes.

  • 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 product as the main content for the webpage.

WPSSO - An Easy Solution for Better Schema

The combination of the WPSSO (aka WordPress Social and Search Optimization) Core Premium plugin and its WPSSO Schema JSON-LD Markup add-on 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, etc. ;-)

WPSSO includes an aggregateRating and review property 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 8-14, 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 Core Premium and its WPSSO Schema JSON-LD Markup add-on support many additional WooCommerce product and variation attributes as well, including:

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

Step-by-Step - Give WPSSO a Try

  1. Install the WPSSO Core plugin:

    From your WordPress site's Plugins > Add New page, search for "WPSSO Core".

  2. Install the WPSSO Schema JSON-LD Markup add-on:

    From your WordPress site's Plugins > Add New page, search for "WPSSO JSON".

  3. After submitting a few posts / pages to the Google Structured Data Testing Tool, if you find there is old Schema microdata from your theme templates in the results, you should install the WPSSO Strip Schema Microdata add-on:

    From your WordPress site's Plugins > Add New page, search for "WPSSO SSM".

  4. Optionally install the WPSSO Schema Breadcrumbs Markup add-on (recommended):

    From your WordPress site's Plugins > Add New page, search for "WPSSO BC".

  5. Optionally install the WPSSO Tune WP Image Editors add-on to improve the quality of your WordPress social and search images (recommended):

    From your WordPress site's Plugins > Add New page, search for "WPSSO TIE".

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

  7. 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 notes provided by email.

  8. For more information on setting up WooCommerce product attributes, and optionally including VAT in product offer prices:

    See the WooCommerce integration notes.