Filter by stock status in WooCommerce: A how-to guide

Filter by stock status

In this tutorial, I'll show you how to set up WooCommerce to filter products by stock status. I'll also reveal three powerful strategies to boost your store's sales and revenue using stock status and stock level information.

As a WooCommerce store owner, you know firsthand that getting people to check out your online store costs a lot of time, effort, and resources. When customers visit your store, the last thing you want is for them to decide to buy a product, then find out that it is out of stock, and leave in frustration.

Unfortunately, WooCommerce itself doesn't provide a stock filter for customers to sort products by stock status. Your only options are to:

  1. Hide items that are temporarily out of stock, which can result in lost sales and reduced SEO traffic.
  2. Show products that are not in stock, which can frustrate customers.

Luckily, you can easily solve this problem with the best product filtering plugin.

With WooCommerce Product Filters, you can keep out-of-stock items visible on your store while providing an an in-stock filter which allows customers to hide out-of-stock products from the product list. This way, you don't lose out on sales and traffic from search engines or risk upsetting customers πŸ˜€

WooCommerce filter by stock status_WooCommerce Product Filters 1

To take things a step further, I'll also show you how to use the WooCommerce Lead Time plugin to add stock information to the shop page. This will make things even clearer to your customers.

Ready to dive in? Let's start with the basics.

What does it mean to filter by stock status in WooCommerce?

WooCommerce provides different stock statuses for products, such as "In Stock," "Out of Stock," and "On Backorder." These statuses help customers know whether or not a product is available for immediate purchase.

Implementing a "Filter by Stock Status" option adds a filter to your store's product archive, Shop, and Category pages. Similar to enabling product filtering based on category, price, etc., customers can select their desired stock status. The page will dynamically update to display available products.

Allowing customers to streamline their product search is useful for many reasons:

  • For products available for immediate purchase: Customers can speed up their shopping experience by filtering to show only items in stock.
  • For products that are out of stock or on backorder: Customers may want to create wishlists to bookmark for future purchases when they become available again.

By default, WooCommerce doesn't offer a filter by stock status, so there are two ways to add this to your store:

  1. By adding a custom code snippet to your site's HTML or theme's functions.php files (only recommended if you have expert-level WooCommerce development skills).
  2. Using a plugin like WooCommerce Product Filter.

This is a code-free tutorial, so we'll use the WooCommerce Product Filter plugin. Keep reading for the step-by-step guide to adding WooCommerce filter by stock status to your site.

Introducing the best plugin for filtering by stock status in WooCommerce

WooCommerce Product Filters sales page screenshot

WooCommerce Product Filters is a powerful plugin that adds robust filtering capabilities to your eCommerce store. It lets shoppers filter products by stock status, category, attribute, price, taxonomy, customer ratings, and virtually anything else.

Plus, you can combine custom sets of filters, nest them hierarchically, and display them on the default Shop, Category, and Archive pages. You can also add them anywhere else on your website using shortcodes or a Gutenberg block or widget.

Key features

WooCommerce stock status filter

You can add a checkbox for shoppers to view only in-stock items and exclude products with other stock statuses.

WooCommerce filter by stock status_WooCommerce Product Filters 3

Additional product filters

WooCommerce Product Filters is a fully-featured product filter plugin. It lets you add filters for attributes, colors, prices, categories, tags, product ratings, on-sale items, and virtually any other field or product data.

WooCommerce filter by product categories and other data

Numerous style options

The "In stock" filter always appears as an on-off toggle. However, the other types of product filter are available in a wide range of styles. This includes radio buttons, checkboxes, dropdowns, tag clouds/labels, and image or color swatches.

WooCommerce product filter styles dropdown checkbox radio button image swatch

Two default layouts

Depending on your preferences, you can showcase the filters above the product list and/or or as sidebar widgets. This is what the two positions look like:

WooCommerce product filter AJAX plugin screenshot

Two filter visibility options

By default, filters are visible on the screen as soon as the page loads. Alternatively, you can hide them when the page loads and allow customers to click on a button to reveal the filters in a slide-out panel:

Show hidden filters button screenshot

Separate filters for mobile versus desktop devices

This is my personal favorite feature. Considering that by 2027 62% of online shoppers are expected to shop from their mobile devices, WooCommerce Product Filters lets you tailor how the filters are presented to customers shopping on desktops versus mobiles:

WooCommerce mobile product filters screenshot

How to allow customers to sort by stock status on the WooCommerce shop or category page

The WooCommerce Product Filters plugin is pretty easy to use β€” the entire setup process takes less than ten minutes. Follow these steps to allow customers to sort by stock status on the WooCommerce category page or main shop page:

Install and activate the plugin

  1. Get the WooCommerce Product Filters plugin.
  2. Download the plugin's zip files to your computer.
  3. Log into your WordPress admin area and go to Plugins β†’ Add New to upload the plugin to your website.
  4. Finally, click on Upload Plugin β†’ Install Now β†’ Activate.
  5. Enter your license key (you'll get this in the purchase confirmation email).

Create and manage filters

Once you've finished choosing your main settings in the setup wizard, you're ready to start creating filters:

  1. Go to Products β†’ Filters.
    WooCommerce filter by stock status_WooCommerce Product Filters 2
  2. Click on 'Add new'.
  3. WooCommerce Product Filters lets you combine multiple filters and present them together as one group. Enter the name for the group in the 'Filter group name' field β€” for example, "Stock Status" or "Shop Filters". This will only be visible to WordPress admins on the site's back end.
    WooCommerce filter by stock status_WooCommerce Product Filters 3
  4. Next, select the 'Add filter' option.
  5. In the 'Filter name' field, type in the label you want to appear at the top of the filter on your site's front end β€” for example, "Stock Status". This will be visible to your store's visitors.
  6. Select 'Filter' from the 'Type' dropdown.
  7. Select 'In stock' from the 'Filter type' dropdown.
  8. Click on the 'Add group' to save the filter group.

Note: As it's the focus of this article, I've only covered how to add the in-stock filter. Repeat steps 2-8 if you'd like to show additional filters with this stock status widget, e.g., for price, category, color, size, ratings, attributes, custom fields, custom taxonomies, etc. Check out this detailed article for a more in-depth guide.

Add filters to the front end

Once you've created the 'in-stock' filter, head to Products β†’ Filters β†’ Settings within your WordPress admin to make it visible on your site's front end.

To add the filter by stock status filter to your sidebar, simply add the 'Filter Group' widget. Alternatively, follow these steps to display the filters above the lists of products throughout your store:

  1. Select the name of the filter group you created earlier. Continuing with the previous steps, I'll select 'Stock Status'.
    WooCommerce filter by stock status_WooCommerce Product Filters 4
  2. Now scroll to the bottom of the page and save your settings.

That's it! Head to the front end of your site for a preview of the product filters. The end result will look something like this:

WooCommerce filter by stock status_WooCommerce Product Filters 1

Benefits of allowing customers to filter by stock level

If a customer finds an item they want to buy and then discovers it's out of stock, they're likely to leave your store and look elsewhere. Adding an In Stock filter to your store solves the problem and avoids a lot of frustration.

Katie Keith - CEO, Barn2 Plugins

Here are the key benefits of adding the WooCommerce filter by stock status option to your site:

  1. Better customer experience (CX): Shoppers can filter out products that are out of stock or on backorder. This makes the user experience smoother and more efficient.
  2. Increased customer satisfaction: It can be frustrating for customers to add out-of-stock items to their cart only to find out later during the shopping journey that the products are unavailable. Allowing customers to filter out products that aren't in stock first leads to better customer satisfaction.
  3. Higher conversion rates: Customers who specifically look for in-stock items have higher buying intent. Instead of overwhelming them with out-of-stock items, only showing products that are ready for immediate purchases makes them more likely to complete their purchases instantly.
  4. Increased sales and revenue: Highlighting the number of products in stock and their stock status can create a sense of urgency and nudge customers to place their orders quickly.

Customers appreciate transparency. Knowing the stock status upfront builds their trust and confidence in your business, as they can see each product's availability before deciding to learn more or place orders.

Bonus: Powerful strategies to boost sales with stock status and stock levels

Here are three simple yet powerful ways to use information about stock status and levels to boost your store's sales and revenue:

Display stock information on the main 'Shop' and 'Category' pages

A 2018 study published in the Journal of Consumer Research showed that any kind of urgency drove people to complete tasks, even when the tasks themselves offered small rewards and were of no consequence.

Showcasing stock quantity β€” especially for items available in limited amounts β€” triggers a sense of scarcity and subtly prompts customers that the products may run out soon. The fear of missing out (FOMO) on items due to low stock motivates them to complete the purchase sooner rather than later.

Unfortunately, there's no default WooCommerce setting to show stock details on the Shop, Category, and Archive pages β€” when this information is most effective.

WooCommerce Lead Time lets you display stock information on multiple touchpoints throughout the shopping journey, such as the main Shop and Category pages, single product pages, cart and checkout pages, and email comms.

You can also use it toΒ show the lead time for each product (more on this in the next section), and when they'll be back in stock.

WooCommerce show stock shop category page
Use the WooCommerce Lead Time plugin to show the stock status and stock levels on the main Shop page

You can even pair it with a discount for buying the last or near-last of an item for an extra sales boost.

Allowing customers to order "out of stock" items

WooCommerce show lead time for backorder products
Consider allowing customers to back order out of stock items, instead of marking them as unavailable

Enabling customers to place orders for items only available for custom orders or temporarily out of stock ensures you don't lose sales.

We have a step-by-step tutorial on How to Display WooCommerce Backorder Products, so I won't go into much detail here. Overall, there are two ways you can enable customers to order out-of-stock items using WooCommerce's default settings:

  1. Option 1: Here, you'll select the 'Allow' options on the inventory tab of the product data module. On the front end, this will show customers that the product is in stock. You'll have to manually monitor and manage the stock level on the back end to make sure you fulfill orders on time.
  2. Option 2: Here, you'll select the 'Allow, but notify customer' setting. With this, Woocommerce will display out-of-stock items as 'Available on Backorder' and allow customers to order them.

The default WooCommerce backorder settings are a good start. However, they have some significant limitations that can hurt sales.

Limitations of the default WooCommerce backorder options

  • If you selected the first option above, customers can place orders for items on backorder without being notified that the items are on backorder. But you'll have to manually track each item on backorder, which can be tedious and prone to human error. Also, you'll likely have to manage support requests from disappointed customers about orders delivered late.
  • If you select the second option above, WooCommerce will clearly show customers that the product is only available on backorder. However, this may not benefit your business because it doesn't allow you to mention when the product will be back in stock. Think about it: would you order a product that's on backorder without any idea when you'll expect to receive the items?

To fix these limitations and boost sales for temporarily out-of-stock or back-ordered products, use the WooCommerce Lead Time add-on to display lead times based on the stock status, i.e., items in stock, on backorder, and out of stock.

With WooCommerce Lead Time, you can showcase product lead times throughout your store, on the Shop page, Categories, products, cart, checkout, and emails. Here's an example showing the stock details on the main Shop page with static text:

Here's what it looks like on the cart page:

Lead time in the Cart

There are four ways to set lead times for products: Globally, per product category, for individual products, and for product variations. This reduces manual work and saves time, as you can set lead times globally or per category and then tweak them for individual products and variations.

Enable back-in-stock notifications

Instead of buying items on backorder, some customers might prefer to wait until it's back in stock before placing their orders. To make it easier for those customers (and ensure you don't lose sales), you can collect their emails to add them to a waitlist and notify them when you've restocked their desired products.

A side benefit of enabling out-of-stock notifications is that it can help build your business's email marketing list.

Check out our full tutorial on setting up a "Back in Stock" notification for instructions on how to set it up on your site.

Add a WooCommerce filter by stock status to your store today!

In this tutorial, I've shown you how to add the WooCommerce filter by stock status to your site with WooCommerce Product Filters.

The WooCommerce Product Filters plugin lets you set up stock status filters to enhance customers' shopping experience, speed up the ordering experience, and ultimately boost sales. With it, you can:

  • Allow customers to filter out products that are not in stock while shopping on your site's shop, category, and other archive pages.
  • Add filter options for categories, tags, product attributes, colors, price range, product ratings, and virtually anything to streamline customers' ordering experience further.
  • Present the filters using dropdowns, radio buttons, checkboxes, tag clouds, labels, and image or color swatches.
  • Showcase a different set of filters for desktop and mobile shoppers for the optimum experience.
  • Showcase the filters on top of the product list or as sidebar widgets for better visual representation.
  • Lots more.

PS: Want to boost your WooCommerce store's sales and revenue further? Combine Product Filters with WooCommerce Lead Time and build trust by displaying stock information directly on the shop page πŸš€

Please share your thoughts...

Your email address will not be published. Required fields are marked *