By default, woocommerce searches by product title and description. To search by SKU, product attributes, and any other metadata (for example, the product price), you need to install the Relevanssi plugin . It can also make the search results more relevant to the query than the standard WooCommerce search.
To set up a search for WooCommerce products and categories, go to the plugin settings (Settings ->Relevanssi).
Post types select product and product_variation:
Taxonomies - select product_cat and product_tag:
To search by attributes select all taxonomies with the pa_ prefix.
Custom fields - 'All' indexes all custom fields for posts.
To search for a short description, check the box - Index the post excerpt.
Click the "Save the options" button, and then the "Build the index" button.
Updated: 19.04.2020Did this article help you? Rate it!
Support on Patreon https://www.patreon.com/processby