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 WooCommerce documentation on Managing Product Attributes for additional information.

  3. You may want to activate the WPSSO Product Metadata for WooCommerce add-on (if you haven't already) to manage GTIN, GTIN-8, GTIN-12 (UPC), GTIN-13 (EAN), GTIN-14, ISBN, and MPN product information in WooCommerce. You can create WooCommerce Product Attributes for these and other values (see bellow), but WooCommerce Product Attributes are designed primarily for selectable product options, not singular product information like GTIN, ISBN, and MPN codes.

  4. 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 is known to offer incomplete Schema markup for Google, 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 information (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.

WooCommerce Product Attributes

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 (upper/lower case is important).

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

When creating WooCommerce Product Attributes, you can use the Product Attribute for variations (ie. the WooCommerce product "Used for variations" option is enabled), or not — if not, then its value will be used for the main product and inherited by variations. If you use the Product Attribute for variations, then you can assign a default value for all variations under the WooCommerce Product "Variations" tab, or not — and if not, then each variation is expected to have a different value, like Color or Size, for example. See WooCommerce documentation on Managing Product Attributes for additional information.

Please note that WooCommerce creates a selector on the purchase page for Product Attributes used for variations, which may be fine for some purchase options like Color, Condition, Size, etc., but is not suitable for other values like GTIN, ISBN, and MPN. We suggest activating the WPSSO Product Metadata for WooCommerce add-on, or using one of the supported 3rd party plugins to manage singular product information like Brand, GTIN, ISBN, and MPN.

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

If you use the WooCommerce Brands, Perfect WooCommerce Brands, or theYITH WooCommerce Brands Add-on plugin, the "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 "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 Test 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 Test 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., or activated one of these supported plugins / add-ons:

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 default name can be useful if you already have one or more existing WooCommerce Product Attributes with different names — for example, using the "Colour" Product Attribute name instead of "Color". ;-)

WPSSO Core Premium uses the Product Attribute names to request Product Attribute values from WooCommerce. Make sure the Product Attribute names in the WPSSO Core settings are identical (upper/lower case is important) to the Product Attribute names you create and use in WooCommerce.

WordPress Custom Fields

What if you prefer Custom Fields for additional product information?

It's possible to use WordPress Custom Fields (aka WordPress post metadata) instead of WooCommerce Product Attributes, but there are some downsides to doing this. Custom fields can only be created for the main product, not for variations, and as such can only offer information for simple products or the main product including all its variations. This may be suitable for values like Brand, where the main product and all its variations share the same Brand value, but may not work for variable information like Color, Size, and singular product information like GTIN, ISBN, and MPN. Keep in mind that WooCommerce is a plugin 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. Clear the relevant Product Attribute name under the SSO > Advanced Settings > Editing Pages > Product Attributes tab.
  2. Enter the relevant Custom Field name under the SSO > Advanced Settings > Editing Pages > Custom Fields tab.

Document SSO > Customize

What if you prefer entering custom values in the Document SSO metabox?

Like WordPress Custom Fields (see above), customized values in the Document SSO metabox can only offer one value, and as such can only offer information for simple products or the main product including all its variations. If you're certain that you want to use customized values in the Document SSO metabox, instead of WooCommerce Product Attributes or WordPress Custom Fields, you need to:

  1. Clear the relevant Product Attribute name under the SSO > Advanced Settings > Editing Pages > Product Attributes tab.
  2. Clear the relevant Custom Field name under the SSO > Advanced Settings > Editing Pages > Custom Fields 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: