WooCommerce Integration Notes

Requirements

  1. The following WooCommerce integration notes are for the WPSSO Core Premium plugin, which includes an integration module to fetch product information from the WooCommerce plugin. If you use the Free / Standard version of WPSSO Core, you will need to purchase the Premium version of WPSSO Core before using these integration notes.

  2. You should be familiar with creating and managing WooCommerce product attributes - see the WooCommerce documentation on Managing Product Attributes for additional information.

  3. You may want to activate the WPSSO Schema JSON-LD Markup add-on (if you haven't already) to replace the default Schema markup offered by WooCommerce. The WooCommerce plugin provides incomplete Schema markup and will not pass Google validation. Unless you have taken steps (ie. coded custom filters) to fix the default WooCommerce Schema JSON-LD markup for Google's Rich Results, you will want to activate the WPSSO Schema JSON-LD Markup add-on.

    Together, the WPSSO Core Premium plugin and its WPSSO Schema JSON-LD Markup add-on provide extensive, complete and correct Schema product markup as JSON-LD for Google Rich Results, including additional product images, product variations, product attributes (brand, color, condition, EAN, dimensions, GTIN-8/12/13/14, ISBN, material, MPN, size, SKU, weight, etc), product reviews, product ratings, sale start / end dates, sale prices, pre-tax prices, VAT prices, and much, much more.

Additional WooCommerce Product Information

The WPSSO Core Premium plugin will read all standard product information from WooCommerce automatically (prices, sku, sales, dimensions, variations, etc.), and can also read the following additional WooCommerce product attributes if you create them in your WooCommerce store (note that upper/lower case is important).

  • 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)

When creating a WooCommerce product attribute, you can use the product attribute for variations (ie. the WooCommerce "Used for variations" checkbox is selected), or not -- if not, then its value will be used for the main product and inherited by the variations. If you use the attribute for variations, then you can assign a default attribute value for all variations under the WooCommerce "Variations" tab, or not -- and if not, then each variation is expected to have a unique value, like color, for example.

Please note the limited selection of product condition values (Damaged, New, Refurbished, or Used), which are determined by Google's Rich Search markup standard -- do not use other values.

If you use the WooCommerce Brands, Perfect WooCommerce Brands, or the YITH WooCommerce Brands Add-on plugin, the "Product Brand Attribute Name" and the "Product Brand Custom Field" options in WPSSO Core Premium will be disabled (as the supported plugin becomes the source of all product Brand information).

If you use the Product GTIN (EAN, UPC, ISBN) for WooCommerce or WooCommerce UPC, EAN, and ISBN plugin, the "Product GTIN Attribute Name" and the "Product GTIN Custom Field" options in WPSSO Core Premium will be disabled (as the supported plugin becomes the source of all product GTIN information).

Google reports "missing a global identifier"?

If the Google Testing Tool reports that "This Product is missing a global identifier (e.g. isbn, mpn or gtin8)" for your WooCommerce products, note that the global identifier referred to by Google is not the Schema 'productID' property, but a general term used by Google for a missing globally common product identifier like the 'mpn' (aka Manufacturer Part Number) or another globally common product identifier (ISBN, GTIN, etc.).

Unfortunately, the often used product 'sku' (aka Stock Keeping Unit) is a number that changes from one retailer to another, so is not valid as a globally common product identifier. If the Google Testing Tool reports a missing global identifier for your Schema Product markup, make sure you have created one (or more) of the WooCommerce product attributes for the MPN, ISBN, GTIN, etc.

Customize Product Attribute Names

You can customize the default product attribute names that WPSSO Core Premium reads from WooCommerce under the SSO > Advanced Settings> Editing Pages > Product Attributes tab.

Modifying the defaults can be useful if you already have one or more existing WooCommerce product attributes with different names -- for example, using the "Colour" attribute name instead of "Color". ;-)

The SSO > Advanced Settings > Integration tab, which includes optional e-commerce product attribute names.

What if you prefer WordPress custom fields?

It's possible to use WordPress custom fields (aka WordPress post meta) instead of WooCommerce product attributes, but there are some downsides to doing this. Custom fields can only offer one value, and as such, can only be applied to simple product markup, not product variations. WooCommerce is also designed to manage products and product information -- using the built-in features of WooCommerce makes more sense than using free-form / non-standard custom fields. If you're certain that you want to use WordPress custom fields, instead of WooCommerce product attributes, you need to:

  1. Enter the desired WordPress custom field name under the SSO > Advanced Settings > Editing Pages > Custom Fields tab.
  2. Clear the desired Product Attribute Name under the SSO > Advanced Settings > Editing Pages > Product Attributes tab.

What if you prefer manual entry in the Document SSO metabox?

Like WordPress custom fields (see above), manual / customized values in the Document SSO metabox can only offer one value, and as such, can only be applied to simple product markup, not product variations. If you're certain that you want to use manual / customized values in the Document SSO metabox, instead of WooCommerce product attributes or WordPress custom fields, you need to:

  1. Clear the desired Product Attribute Name under the SSO > Advanced Settings > Editing Pages > Product Attributes tab.

Product Prices with Value Added Tax (VAT)

The WPSSO Core Premium plugin provides WooCommerce product prices in meta tags and Schema markup without tax by default. If you prefer your meta tags and Schema markup to include product prices with VAT, you can define the following constant in your wp-config.php file: