A Better ‘pre_get_posts’ Search for WooCommerce

WPSSO + WooCommerce logos.

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 search 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


WPSSO – Product Condition and WP / PHP Versions

WPSSO v3.40.3-1 plugin has been released (see the complete Changelog here) — this new version adds a custom “Product Condition” option in the Social Settings metabox, along with updating the minimum & recommended versions for WordPress and PHP.

The new “Product Condition” option will be visible only if the Open Graph og:type meta tag value is a “product” — which is the default value for all product pages from Easy Digital Downloads, MarketPress – WordPress eCommerce, WooCommerce, WP eCommerce, and most other e-commerce plugins (developers can also hook the ‘wpsso_og_type’ filter to change the default value – see the complete list of filters here).

Continue reading


WPSSO – Product Availability, Price and Currency

WPSSO v3.40.0-1 has been released (see the complete Changelog here) — this new version adds custom Product Availability, Price and Currency options to the Social Settings metabox.

These options will be visible only if the Open Graph og:type meta tag value is a “product” — which is the default value for all product pages from Easy Digital Downloads, MarketPress – WordPress eCommerce, WooCommerce, WP eCommerce, and most other e-commerce plugins that use a “product” custom post type (developers can also hook the ‘wpsso_og_type’ filter to change the default value – see the complete list of filters here).

Continue reading