How to Search Products by SKU in WooCommerce

Want to allow customers to search products by SKU in your WooCommerce store? This guide will help you do it.

WooCommerce’s default search option doesn’t allow customers to search products by SKU by default. So, in this guide, we’ll show you how to do it.

We’ll walk you through:

  • Can you add SKU search to default WooCommerce?
  • What to look for in a WooCommerce SKU search plugin.
  • How to add SKU search in WooCommerce.
  • What is a SKU code?
sku search woocommerce

Can you add SKU search to default WooCommerce?

The first thing we need to address is whether WooCommerce can allow you to search products by SKU by default or not.

WooCommerce’s current default search is built on WordPress’ native search feature (WP_Query). This means it was designed for posts and pages, which scans things like post titles, content, and excerpts, rather than product data.

So, by default, WooCommerce search doesn’t index SKUs as a searchable field. On top of missing the ability for customers to search products by SKU, it’s also limited in its ability to search via custom attributes and taxonomies.

default sku woocommerce search
Default WooCommerce search results for a SKU query

Because this default search feature is built for a completely different type of content, it’s often slower and lacks a lot of the additional search features you might be looking for your store.

So, what’s the solution? You could use custom code to add search functionality to your store. But that takes effort and knowledge of things like meta_query modifications, posts_search hooks, and getting to grips with your functions.php file.

Instead, we’re going to go for a much more reliable option and use a WooCommerce search plugin to add SKU search to your WooCommerce store.

Product Search for WooCommerce
Product Search for WooCommerce

Add SKU search to your WooCommerce store in minutes.

Find out more

What to look for in a WooCommerce SKU product search plugin

If you’re looking to add a product search plugin to your WooCommerce store, there are a few features you’ll want to look out for:

  • SKU search. If you’re reading this guide, then SKU search is likely a priority for you. So the SKU plugin you pick must do this as a baseline. As a bonus, you should make sure it also:
    • Has support for variation SKUs, not just parent product SKUs.
    • Supports partial SKU matching, so customers don’t need to type the full SKU exactly.
  • Includes ‘Fuzzy Search’. This is a feature that accounts for matches even when words are misspelled or incomplete.
  • Can deliver fast search results. Even with large catalogs.
  • Includes search by ISBN, GTIN, and more.
  • Allow for search via custom fields and product attributes.
  • Includes style features that allow you to customize how your search looks, as well as how it functions.

So with all of this in mind, which WooCommerce search plugin ticks every box? In this case, we recommend our plugin Product Search for WooCommerce.

product search for woocommerce

How to add SKU search in WooCommerce using Product Search for WooCommerce

Product Search for WooCommerce by Studio Wombat adds a fast, intelligent live search bar to WooCommerce stores. It supports searching by SKU, product name, description, attributes, categories, and global identifiers such as GTIN and ISBN, with a dedicated search index that handles catalogs of up to 50,000 products.

It’s seriously fast, with the ability to deliver search results to your customers in a fraction of a second. So it doesn’t matter how large your product catalog is, Product Search for WooCommerce can handle it with ease. This helps ensure your customers can find the products they want, rather than waiting and eventually giving up.

Product Search for WooCommerce demo

Of course, while searching products by SKU is one of its features, this product search also has full product variation support, so you can choose whether to show the parent product or individual variations in search results.

It also has partial matching via the search index and relevance ranking. So customers don’t need to type the full search phrase before seeing relevant results. And to top it all off, customers will be able to see additional information in search results like product images and prices, so they can quickly grasp which search result is relevant to them.

Okay, so now we know what Product Search for WooCommerce can do; let’s get it set up and running.

Product Search for WooCommerce
Product Search for WooCommerce

Add SKU search to your WooCommerce store in minutes.

Find out more

How to set up SKU search with Product Search for WooCommerce

To add a search products by SKU feature using the Product Search for WooCommerce plugin, follow these steps:

Step 1: Customize your product search settings

After installing the Product Search for WooCommerce on your WordPress site, you’ll be able to customize your search settings. This will allow you to determine what customers can use to search and the results your search bar will give them.

To do this, take the following steps:

  1. From your WordPress dashboard, go to WooCommerce → Settings, and click on the Product Search tab/link at the top of the page.
woocommerce search products by sku settings
  1. In Search settings, you’ll see the product data options customers will be able to use to search. In this case, we want to make sure Product SKU is on.
enable SKU search
  1. On this page are the rest of your search settings. It includes things like including out-of-stock products, variable product support, and advanced search settings like Fuzzy Search (typo support).
typo support product search
  1. Once you’re happy with all your search settings, click the blue Save changes button at the bottom of the page.

Step 2: Customize your search bar’s design

Now that we have our underlying search functionality set up and customized, we can next work on the search bar’s design.

To do this, take the following steps:

  1. Click the Design Settings tab/link at the top of the page. This will open up your search bar design settings.
  2. Here you’ll be able to customize everything from the background color to the border radius, spacing, button styling, search results dropdown, and more.
product search design settings
  1. Once you’re happy with all of these changes, click the blue Save Changes button at the bottom of the page.

Step 3: Add the search bar to your store

We now have our search bar designed and functioning exactly as we like it, now it’s time to add it to our store.

The way you do this will depend on what kind of theme you’re using. For this tutorial, we’ll demonstrate using a block theme.

To do this, take the following steps:

  1. From your WordPress dashboard, go to Appearance → Editor, then click Templates.
wordpress templates
  1. On this page, you’ll see all of your site templates. Click WooCommerce to narrow this down and find your Product Catalog template. Click on it to open.
woocommerce shop template
  1. Once here, you’ll be able to add your search bar via a block. Where you add this depends on your template and site design. You could add it to a sidebar, or at the top of the page, for example.
  2. To add the block, click the black + icon and in the search bar, type ‘Product Search’. Then click the Product Search result. This will add your search bar into the page template.
add produce search block
  1. You’ll be able to customize the button position on this page, but if you want to customize it further, you can do so by clicking the Open design settings link.
producct search block settings
  1. Once you’re happy with how your search bar looks, click Save on your template and take a look at your new search bar working on the frontend of your store.
sku search woocommerce

What is an SKU code?

A SKU (Stock Keeping Unit) is a unique identifier given to each product or product variation. It’s used to tell products apart from one another in inventory management, order processing, and your product catalog.

For stores with large product catalogs, SKUs are often the fastest and most accurate way to find a specific product. Searching by name can return multiple muddled results, but an SKU code is a lot more precise.

This kind of thing is particularly useful for B2B stores where buyers often know exactly which SKU they need, and for stores with product variations where each size, color, or variant has its own unique identifier.

sku code woocommerce

Add SKU search to your WooCommerce store

So there we have it, the easiest way to add SKU search to your WooCommerce store.

WooCommerce’s default search was not built for SKU search and falls short for most stores that need it. Product Search for WooCommerce adds a fast, dedicated search index that handles SKUs, variation SKUs, partial matches, and typos, without custom code or slow database queries.

See how Product Search for WooCommerce works by visiting our demo and install the plugin to add improved product search without slowing down your site.

Product Search for WooCommerce
Product Search for WooCommerce

Add SKU search to your WooCommerce store in minutes.

Find out more
Share