Customers often have different perspectives on products than you do.
While you may categorize your inventory by names and categories, many shoppers store product codes in their notes, find them on old invoices, or receive recommendations from colleagues.
When they cannot search using these familiar SKU codes, locating the right product becomes unnecessarily difficult.
SKU search is especially beneficial for specific customer types. For instance, wholesale buyers typically rely solely on product codes. Repeat customers remember the SKUs of their favorite items, and technical buyers often refer to specific model numbers.
By enabling your search function to accommodate these shopping behaviors, you streamline the purchasing process.
In this guide, we will show you the simplest way to activate SKU product search in your WooCommerce store.
Why Should You Enable SKU Search in WooCommerce?
To successfully operate a WooCommerce store, it is essential for your customers to easily locate the products they want to buy. Most eCommerce platforms utilize SKUs, or Stock Keeping Units, to uniquely identify each product, making this process straightforward.
If a customer knows the SKU of the product they want to buy, why not allow them to search for it and quickly find the right item in your store?
WooCommerce SKUs are stored in custom fields, which are not indexed or included in search results by default. Consequently, searching for a SKU will not yield any results.
Let’s explore how to resolve this issue by enabling SKU searches in WooCommerce through a product search plugin.
Steps to Enable Product SKU Search in WooCommerce
The simplest method to enable product SKU searches in WooCommerce is by using the SearchWP plugin.
SearchWP is the leading custom search plugin for WordPress, utilized by over 30,000 websites. It allows you to customize the search algorithm to include product SKUs, implement live Ajax search for instant results, highlight search terms, enable fuzzy search, and much more.
We have thoroughly tested the plugin on our demo site and found it to be the most effective and user-friendly solution for enhancing search results in WordPress. To learn more about our experience, check out our comprehensive SearchWP review.
First, install and activate the SearchWP plugin. You will need at least the Pro plan to access WooCommerce integration. For detailed instructions, refer to our step-by-step guide on installing a WordPress plugin.
After activation, navigate to theSearchWP » SettingsNavigate to the ‘Support’ tab on the page to enter your license key, which you can find in the downloads section of your SearchWP account.
Next, install and activate the WooCommerce Integration extension for SearchWP.
You can also find this extension in the downloads section of your SearchWP account. Install it just like any other WordPress plugin.
You are now set to customize the SearchWP search engine to index your product SKUs.
Simply go to the SearchWP » Settings page and ensure you are on the ‘Engines’ tab. Then, click the ‘Sources & Settings’ button.
A popup will appear; make sure the checkbox next to ‘Products’ is selected. This enables SearchWP to index your WooCommerce products.
If you want to include WooCommerce product reviews in your search results, ensure the ‘Comments’ box is also checked, as product reviews are stored as comments in WooCommerce.
After that, click the ‘Done’ button to close the popup and prepare to add SKU search functionality.
Scroll down to the ‘Products’ section. By default, the plugin only searches through the product title, description, slug, and excerpt.
To include SKUs in your search results, click on the ‘Add/Remove Attributes’ button. A popup will appear allowing you to add specific custom fields and taxonomies to the search.
Type ‘SKU’ in the Custom Fields section and select the _sku option from the dropdown menu. This will ensure that SKUs appear in your WooCommerce search results.
Now, click the ‘Done’ button.
You will see a new section titled ‘Custom Fields’ with the _sku field listed below it.
Initially, the relevance slider will be positioned all the way to the left, indicating that SKU search results will have the lowest priority.
Since SKUs are crucial for locating your products, move the _sku slider all the way to the right, as shown above.
Once you’re finished, click the ‘Save Engines’ button at the top of the screen to save your changes.
SearchWP will begin rebuilding your search index in the background. This process may take a few minutes, but once it’s done, you’ll be able to search your WooCommerce store using product SKUs.
SearchWP will automatically integrate with any search forms present on your online store, so no additional steps are necessary if you already have them set up.
If you need to create a search form, please refer to our detailed guide on how to build a custom WordPress search form. This guide will also show you how to customize the results page using custom CSS.
You can now visit your WooCommerce store to test the new search functionality.
In our demo store, the long sleeve tee has the SKU ‘woo-long-sleeve-tee.’ When we search for this SKU, the correct product appears in the results.
If you’re interested in enhancing the search functionality on your online store, check out our guide on how to create an effective WooCommerce product search.
Frequently Asked Questions
Here are some common questions our readers have about enabling SKU-based product search in WooCommerce:
Do I need to write any code to enable SKU search in WooCommerce?
No, you don’t need to write any code if you’re using the appropriate plugin.
While editing your theme’s functions file or adding custom code is an option, using a user-friendly tool like SearchWP allows you to activate SKU search easily through a straightforward settings panel. Simply check the box to include SKUs, rebuild your index, and you’re all set.
Will enabling SKU search impact my store’s performance?
Activating SKU search will not impact your store’s performance if you use a well-optimized plugin like SearchWP.
SearchWP is built to manage extensive catalogs without slowing down your site. It creates a separate index to facilitate searches efficiently, ensuring that even with thousands of products, your search remains quick and precise.
Can customers search using partial SKUs?
Yes, with SearchWP, you can enable the partial matches feature, allowing customers to search using partial SKUs.
This means customers don’t have to enter the complete SKU to locate a product—typing just a portion will suffice. This is particularly useful if your SKUs are lengthy or follow a specific format.
For detailed instructions, check out our tutorial on how to implement fuzzy search in WordPress.
What if I am already using another search plugin?
If you are using a different search plugin, you should verify whether it supports custom fields and integrates with WooCommerce.
Some plugins only search through titles and content, which means they won’t capture SKUs. If SKU search is crucial for your store, switching to SearchWP could be the simplest and most dependable way to achieve that functionality.
Expert Guides for Enhancing Search in WordPress & WooCommerce
We hope this tutorial has helped you learn how to enable product search by SKU in WooCommerce. You may also want to explore additional articles on enhancing search functionality in WordPress and WooCommerce:
- How to Create an Intelligent WooCommerce Product Search
- How to Resolve Issues with WooCommerce Product Search
- How to Personalize the WooCommerce Product Search Results Page
- How to Filter WooCommerce Products: A Step-by-Step Guide
- How to Enhance WordPress Search with SearchWP: A Quick and Easy Guide
- How to Implement a Search Toggle Effect in WordPress
- How to Utilize Multiple Search Forms in WordPress
- Top WordPress Search Plugins to Enhance Your Site’s Search Functionality
- How to Incorporate Fuzzy Search in WordPress for Better Results
- How to Enhance WordPress Search Using Amazon CloudSearch
If you enjoyed this article, please subscribe to our YouTube Channel for WordPress video tutorials. You can also connect with us on Twitter and Facebook.



