A Better ‘pre_get_posts’ Search for WooCommerce

WPSSO + WooCommerce

I recently wrote a plugin to provide missing GTIN, GTIN-8, GTIN-12 (UPC), GTIN-13 (EAN), GTIN-14, ISBN, MPN, Depth, and Volume values for WooCommerce Products and Variations. As part of that plugin, I extended the WordPress search feature to include metadata from WooCommerce products (and their variations). The standard way to extend the WordPress search feature is to hook the “pre_get_posts” action and modify the WP_Query to include additional posts / products in search results. There are some serious drawbacks to doing this – with or without WooCommerce – but especially with WooCommerce.

Continue reading


GTIN, UPC, EAN, ISBN, MPN for WooCommerce

WPSSO + WooCommerce

There are several ways to create additional product information in WooCommerce – the most common is by creating Product Attributes, either as an Attribute taxonomy term or individually for each product, and then using those Product Attributes for variations. This is great for selectable variation attributes like Color, Size, etc., but does not work well for unique / singular information like GTIN, UPC, EAN, ISBN, and MPN (Manufacturer Part Number). What is required instead is a different way to manage this unique / singular information on the product editing page, which is then shown on the WooCommerce purchase page under the “Additional information” tab.

Continue reading


[Solution] Better Schema for WooCommerce

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

I’ve written a simple Step-by-step Guide for WooCommerce and WPSSO that explains these issues, and offers a quick and easy solution.

Continue reading


[Solution] Google Reports Missing “Product Identifier” for WooCommerce Products

WooCommerce manages information on product Availability (aka Stock), Prices, SKU, etc., but additional WooCommerce product attributes must be created to provide more product information for Google.

The WPSSO Core Pro plugin (and its WPSSO Schema JSON-LD Markup Pro add-on), for example, include a variety of WooCommerce product attribute values in its Schema markup, including the product Brand, Color, Condition, EAN, GTIN-8, GTIN-12, GTIN-13, GTIN-14, ISBN, Material, MPN (aka Manufacturer Part Number), Size, and Gender.

Continue reading