Adding custom fields to your WooCommerce products is a great way to expand the functionality of WooCommerce and add new data to your products. However, WooCommerce does not allow you to filter your products using custom fields as search filters. But in this tutorial, we will show you how to search for WooCommerce products by custom fields.
Important – This method works for any custom field plugin that allows you to add custom fields to your WooCommerce products. It works for the most popular custom fields plugins:
- Advanced Custom Fields
- PODS
- Meta Box
- Custom Field Suite
- WordPress Creation Kit
- WooCommerce Product Addons
- Easy Post Types and Fields
- And any other custom fields plugin!
For this we will use the WP Sheet Editor – WooCommerce Products plugin. It allows you to view and manage your WooCommerce products in a spreadsheet. It allows you to:
- Run advanced searches using any product field and custom field as a search filter
- Bulk edit thousands of products
- Copy variations between products
- Create hundreds of variations with a few clicks
- Duplicate products with a few clicks
- Export and import products using CSV files.
In this case, it will help us find products based on specific custom fields.
You can download the plugin here:
Download WooCommerce Products Spreadsheet Plugin - or - Check the features
Once you have installed the plugin, you need to follow the steps below in order to search for products using custom fields.
Step 1 – Open the products spreadsheet
Go to WP Sheet Editor > Edit products to open the spreadsheet.
You’ll see all your WooCommerce products displayed in the spreadsheet as rows, and all the fields displayed as columns.
As you can see below, in this example we have added custom fields to our WooCommerce products, using the Advanced Custom Fields plugin, but you can add custom fields to your products using any other plugin like PODS, Meta Box, Custom Field Suite, WordPress Creation Kit, WooCommerce Product Addons, Easy Post Types and Fields, etc.
Step 2 – Open the “Search” tool
WP Sheet Editor‘s “Search” tool allows you to search for your WooCommerce products using any field as a search parameter.
You can use all product fields, including custom fields added with other plugins.
You can open it by clicking on Search.
Step 3 – Search WooCommerce products by custom field
All custom fields can be used as a search filter, so you’ll be able to find your products with a few clicks.
You can use any of these fields as search filters:
- Range
- Text
- Text Area
- Button Group
- Checkbox
- Radio Buttons
- Select
- True / False
- File
- Gallery
- Image
- oEmbed
- Wysiwyg Editor
- Color Picker
- Date Picker
- Date Time Picker
- Google Map
- Time Picker
- Accordion
- Flexible Content
- Group
- Tab
- Clone
- Repeater
- Link
- Page Link
- Taxonomy
- User
- Post Object
- Relationship
- Repeater fields
- Etc.
In this example, we will use a dropdown selector field to find our products.
To search for products using custom fields as search criteria, you need to:
- Tick the Enable advanced filters checkbox.
- Field: Select the custom field you want to use to search for your products.
- Operator: Select an operator. In this case, we will select the equal (=) operator.
- Value: Select the value you want to use to find on your products.
- Click on Run search.
After running the search, you’ll view all the products matching the search filters displayed in the spreadsheet.
You’ll see the active search filters above the spreadsheet, and you can move to the column / custom field you used as a search parameter to confirm that results match the search terms.
Use any custom field to find products!
WP Sheet Editor allows you to run advanced searches on WooCommerce products, using any field as a search parameter.
This will help you save a lot of time and expand your WooCommerce product management experience.
You can download the plugin here:
Download WooCommerce Products Spreadsheet Plugin - or - Check the features