Filtering by product options or add-ons
A common question is whether customers can filter your shop by the product options (sometimes called product add-ons) that you have added to your products. The answer depends on how those options were created, so this article explains exactly what is and isn't possible.
This applies when you are using two of our plugins together: WooCommerce Product Options, which lets you add extra options and product add-ons to your products, and WooCommerce Product Filters, which lets customers filter your shop and category pages.
The short answer
- If your options are based on real WooCommerce product attributes and variations, then yes, WooCommerce Product Filters can filter by them in the usual way.
- If you created the options directly in WooCommerce Product Options, and they are not actual product attributes or variations, then they cannot be filtered by WooCommerce Product Filters.
Why this is the case
WooCommerce Product Filters works by filtering products based on the data that WooCommerce stores about each product, such as its categories, tags, and attributes. Product attributes (and the variations built from them) are part of WooCommerce itself, so the filters plugin can read and filter by them.
WooCommerce Product Options, on the other hand, lets you add extra options and product add-ons directly to a product, separate from WooCommerce's built-in attributes. These options are stored as part of the product's options rather than as WooCommerce attributes, so the filters plugin has no attribute data to filter on.
If you want your options to be filterable
If filtering by a particular choice matters to you, set it up as a real WooCommerce attribute and variation rather than as an option created only in WooCommerce Product Options:
- Add the attribute to your product under the Attributes tab, and add the terms you want (for example, a 'Color' attribute with 'Red', 'Blue', and 'Green').
- Create variations from that attribute so it becomes part of the product's data.
- You can still use WooCommerce Product Options to present these attributes attractively, for example as color swatches or image buttons.
- Set up a filter for that attribute in WooCommerce Product Filters.
Customers will then be able to filter your shop by that attribute, while still seeing the enhanced display from WooCommerce Product Options.
If your add-ons can't be attributes
Some product add-ons don't make sense as attributes or variations, for example a text field for a custom message, a file upload for artwork, or an optional gift-wrapping checkbox. These are best created in WooCommerce Product Options, and they won't be filterable. That is expected, because they describe a customization rather than a fixed product characteristic that customers would browse by.
If you're not sure whether your setup can be made filterable, get in touch and let us know what you're trying to achieve, and we'll be happy to advise.
Related Articles
- How to add quantity inputs for your product options
- Create shareable cart links with pre-configured product options
- How to customize the "On Sale" and "In Stock" filter labels
- How to choose the items in the 'Sort' dropdown
- How to translate any Barn2 plugin with WPML
- Where can I download the options from the WooCommerce Product Options demo site?