1. Home
  2. Help Center
  3. WooCommerce
  4. Errors
  5. Woocommerce Error – Sorry, this product is unavailable. Please choose a different combination

When you encounter the message “Sorry, this product is unavailable. Please choose a different combination”, it means that you are dealing with a WooCommerce variable product problem. In most cases, the problem has to do with how attributes were previously set up in WooCommerce.

How to Fix the Error?

Now we’ll show you some possible ways that can help you fix the issue.

Method 1: Add a code

In most cases, the problem was in ajax_variation_threshold. Therefore, you need to raise the number of requests allowed. Add the following code to wp-content/themes/goya-child/functions.php

function woo_custom_ajax_variation_threshold( $qty, $product ) {
 return 50;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'woo_custom_ajax_variation_threshold', 10, 2 );Code language: PHP (php)

Method 2: Re-assign each variation

If it doesn’t work, you can try removing all the attributes and re-assigning each variation all over again.

Now we will give you one example so that you will have a better understanding of how this method works.

In this example, the Size attribute values for a variable product were set to: SMLXL810121416 typed out with separators in the product’s attributes.

Here’s how you fix it.

Step 1: Edit a Variable Product

First of all, you need to log in to your WooCommerce account and go to Products.

Then, you need to navigate to the product that you have trouble with and click on the button Edit right next to the product.

Step 2: Remove the existing values

Next, you go to the Product data section. Choose the option Variable product from the dropdown menu.

After that, go to the setting Attributes, and click on the button Remove to remove all the existing values pertaining to Size.

Step 3: Add the attribute again

Now you need to add the attribute again by clicking on Add. Once done adding, click on Select All and then Save Attributes.

Step 4: Re-assign each variation

Here you need to go to the setting Variations. After that, set the default size and re-assign every variation as the image below.

Hopefully, after taking this last step, you can see no more error messages.

Was this article helpful?