Enable Product Search by SKU in WooCommerce

Wouldn’t it be great if your customers could search for your WooCommerce products using their SKU code? SKU codes are unique identifiers that make it easier for users to find exactly what they’re looking for. The only problem is that SKU search is not enabled in WooCommerce by default. But don’t worry, we’ve got you covered. In this article, we’ll show you how to enable search by product SKU in WooCommerce.

How to Enable Search by Product SKU in WooCommerce

Why Enable Search by Product SKU in WooCommerce?

In order to run a successful WooCommerce store, it’s crucial for your customers to easily find the products they want to purchase. That’s why most eCommerce platforms use SKUs, or Stock Keeping Units, to uniquely identify each product. If a customer knows the SKU for the product they want to purchase, why not let them search for it and instantly find the correct product in your store?

The problem is that WooCommerce SKUs are stored in custom fields, and these fields are not indexed or included in search results by default. This means that searching for the SKU won’t help. But don’t worry, we’ll show you how to solve this problem by enabling users to search by SKU in WooCommerce using a product search plugin.

How to Enable Search by Product SKU in WooCommerce

The first step is to install and activate the SearchWP plugin. You’ll need at least the Pro plan to access WooCommerce integration. SearchWP is a highly customizable search plugin for WordPress and is used by over 30,000 websites. It allows you to customize the search algorithm, add live Ajax search for real-time results, and more.

See also  ProgramMatek: The Ultimate Solution for WooCommerce Photography Plugins

Once you’ve activated the plugin, visit the SearchWP » Settings page and switch to the ‘Support’ tab. Enter your license key, which you can find in your downloads area on the SearchWP site.

Next, install and activate the WooCommerce Integration extension for SearchWP. You can find this in your account’s downloads area on the SearchWP website. Install it like you would install any other WordPress plugin.

Now it’s time to customize the SearchWP search engine to index your product SKUs. Go to the SearchWP » Settings page and navigate to the ‘Engines’ tab. Click the ‘Sources & Settings’ button.

A popup will appear. Make sure the checkbox next to ‘Products’ is checked to allow SearchWP to index your WooCommerce products. If you’d like to include WooCommerce product reviews in your search results, check the ‘Comments’ box as well, as product reviews are stored as comments in WooCommerce.

Close the popup and scroll down to the ‘Products’ section on the same page. By default, the plugin only looks at the product title, content (description), slug, and excerpt (short description). To include SKUs in the search results, click the ‘Add/Remove Attributes’ button.

In the popup, type ‘SKU’ under Custom Fields and choose the _sku option from the dropdown menu. This will add SKUs to the WooCommerce search results pages. Click the ‘Done’ button.

Select `_sku` From the Custom Field Dropdown Menu

Notice that there is now a new section labeled ‘Custom Fields’ with the _sku field underneath. By default, the relevance slider for SKUs is set to the lowest priority in search results. To give SKUs higher priority, simply move the _sku slider all the way to the right.

See also  The Best Gift Card Plugin for WooCommerce

Slide the SKU Relevance Slider to the Right

Click the ‘Save Engines’ button at the top of the screen to save your settings. SearchWP will start rebuilding your search index in the background. It may take a few minutes to complete, but after that, you will be able to search your WooCommerce store by product SKU.

SearchWP will automatically use any search forms on your online store, so there’s no need to take any additional steps if you already have them on your site. However, if you need to add a search form, you can refer to our step-by-step guide on how to create a custom WordPress search form. This guide will also teach you how to style the results page using custom CSS.

Now it’s time to try out the search feature on your WooCommerce store. Search for a product by its SKU, and the correct product should be displayed.

Preview of Product SKU Search in WooCommerce

If you want to further enhance the search capabilities of your online store, be sure to check out our guide on how to make a smart WooCommerce product search.

We hope this tutorial has helped you learn how to enable product search by SKU in WooCommerce. For more helpful tips and tricks, subscribe to our YouTube Channel for WordPress video tutorials. You can also connect with us on Twitter and Facebook.

Remember, with ProgramMatek, you can unlock the full potential of your WooCommerce store. Visit ProgramMatek today!