Knowledge Base

WooCommerce: Search product attributes

WooCommerce product attributes are actually stored as custom fields (post meta) and terms, therefore it's possible to search them very easily.

Solution 1 – using regular engine (default)

The easiest and most convenient solution is to enable the search in all custom fields and the search in terms. Both options can be found on the General Options -> Sources panel:

ajax-search-pro-search-woocommerce-attributes1

Solution 2 – using the index table engine

In case you are using the index table engine, you can be more selective about which fields you want to index. Most product attributes are stored as taxonomy terms, while some built in ones like the product SKU is stored as a custom field.

On the index table options panel you will be able to find them easily. The product SKU is stored as “_sku” on the custom fields list, and the product attributes are the ones that start with the “product – “ prefix:

ajax-search-pro-search-woocommerce-attributes2