How To Remove Out of Stock in WooCommerce

Managing an online store can be challenging, especially when dealing with out-of-stock products. If your WooCommerce store displays unavailable items, it can frustrate customers and negatively impact sales. This guide will walk you through how to remove out-of-stock products, ensuring a cleaner and more efficient shopping experience.


Why Remove Out of Stock Products?

  • Improved User Experience: Customers won’t be frustrated by clicking on unavailable items.
  • Increased Conversion Rates: Focus your customers’ attention on products they can actually purchase.
  • Better Inventory Management: Streamline your inventory by displaying only available items.

Methods to Remove Out of Stock Products

1. WooCommerce Settings

The simplest method is using WooCommerce’s built-in settings:

  1. Log in to your WordPress Dashboard.
  2. Navigate to WooCommerce > Settings.
  3. Click on the Products tab and go to Inventory.
  4. Check the box labeled “Hide out of stock items from the catalog.”

This automatically removes out-of-stock products from your shop and category pages.

2. Use Custom Code

For more control, you can add a PHP snippet to your theme’s functions.php file:

add_filter('woocommerce_product_query_meta_query', 'custom_remove_out_of_stock_products');

function custom_remove_out_of_stock_products($meta_query) {
    $meta_query[] = array(
        'key' => '_stock_status',
        'value' => 'outofstock',
        'compare' => '!='
    );
    return $meta_query;
}

This filters out out-of-stock products from your shop.

3. Plugins for Advanced Management

If you prefer a plugin solution with additional features, consider:

  • WooCommerce Stock Manager: Advanced inventory controls including hiding out-of-stock products.
  • Advanced WooCommerce Product Filter: Lets users filter products based on stock status.

4. Optimize Product Visibility

Even after hiding out-of-stock items, optimize product display for a better shopping experience:

  • Reorder Products: Display popular or high-stock items first.
  • Use Clear Labels: Highlight low-stock items to create urgency. You can also use a plugin like WBW Product Labels & Sales Badges to easily add custom labels, badges, or sales stickers to your products.

SEO Considerations When Removing Stock

  • Use 301 Redirects: Redirect out-of-stock product pages to similar products or relevant categories.
  • Update XML Sitemaps: Ensure your sitemap reflects removed products.
  • Monitor Google Search Console: Check for crawl errors or SEO issues.

Conclusion

Removing out-of-stock products improves both user experience and store management. Whether you use WooCommerce settings, custom code, or plugins, each method offers flexibility for different technical skill levels. Always follow SEO best practices to maintain your site’s visibility.

Implement these strategies today to enhance the functionality and user experience of your WooCommerce store!

What should you do next?

Thanks for reading till the end. Here are 4 ways we can help you grow:

Want to learn more?

Explore our full collection of How-To guides to master every feature and functionality.

Check out How-To Guides →

Looking to grow your store?

Browse our WooCommerce plugins to discover tools that can improve performance and boost your sales.

Browse WooCommerce Plugins →

Curious about related topics?

Visit our blog for more tutorials, expert insights, and the latest trends in e-commerce.

Visit Our Blog →

Still confused about this topic?

Submit your question or contact our support team directly. We are here to help!

Contact Support Team →

Latest Articles

Shopping Cart