Home > WooCommerce > Docs > How to Fix WooCommerce 'This Product is Currently Out of Stock and Unavailable'?

How to Fix WooCommerce 'This Product is Currently Out of Stock and Unavailable'?

Last updated: May 01, 2024
This article has been written and researched by our expert Avada through a precise methodology. Learn more about our methodology

Sam

Author

Daniel

Researcher

Have you ever received a message from WooCommerce saying This product is currently out of stock and unavailable? What are you supposed to do to fix this issue?

In today’s article, we’ll give you three approaches to solve this problem. Let’s get started!

How to Fix WooCommerce This Product is Currently Out of Stock and Unavailable?

1. Replace the 0 value with null

The first solution for resolving this issue is to substitute 0 with null.

That is because in this case, your stock is set to 0 when it should be null.

As a result, you need to use find-and-replace on the database to replace the 0 value with null.

You may also fix it in this way. Expand each variation by going into each individual product and clicking on the tab Variations. Then uncheck the Manage stock option.

Replace the 0 value with null

2. Add codes to the functions.php of your child theme

The key to resolving this issue was variations. When utilizing ajax to update the variations on the product page, WooCommerce typically permits 60 product variations in total, and in most scenarios, the error message is due to the product surpassing this limit.

To resolve the issue, add the following code to your child theme’s functions.php file:



// Increase WooCommerce Variation Limit
function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 100;
}

add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 100, 2 );


3. Enter “Regular Price” for every variation

There is another approach to this problem. For each variation, you must provide a “Regular Price.”

Step 1: Navigate to Product > Variations.

Step 2: Click on the dropdown box that says Add Variation by default. Then click Go.

Enter "Regular Price" for every variation

Step 3: Click the blue Expand text and make sure to enter in Regular Price for each variation.

Enter "Regular Price" for every variation

Step 4: Save changes

Final Words

We hope that our three ways to solve the WooCommerce product error This product is currently out of stock and unavailable are useful to you. Thank you for reading and we’ll see you in the next post.


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.

Stay in the know

Get special offers on the latest news from AVADA.