Sorry, no products matched your selection. Please choose a different combination WooCommerce

I have changed dropdown to radio button using wc-variations-radio-buttons-master The different color is also actually radio button.

The current link product have 12 such variation which have product and not other. Some combination I can explain such as Silver,Matching upholstery,VC,RegularSeat and Silver,Matching upholstery,ACC,RegularSeat have product while Silver,Matching upholstery,Regular,RegularSeat have not product now i want to hide Regular option from current scenario and all other such option which have not product.

I meant to show those radio button which have product if not then hide irrelevant radio button

Product link


Please check variation matrix table, for correctly matched select of all variants with each other....


2x2 means 11 12 21 22


111 122 113 221 222 223 331 332 333

One of the quirks in WooCommerce that causes this sort of situation is not having prices on all of your variations, the system does not always tell you that it is required so unexpected things can happen. Please check your variation data and make sure all variations have a price.

If I understand your question correctly, you want woocommerce to prevent users from selecting certain combinations of options on variable products, unless a variation with the selected options actually exists and is in stock?

This probably is due to the woocommerce_ajax_variation_threshold. If your product contains more variations than the threshold specifies, woocommerce will wait until all variation options have been selected by the user before determining if the selected combination of options is valid(in stock, exists, etc). If the user has selected a combination that is not valid or is not instock, you will get the

Blockquote Sorry, no products matched your selection. Please choose a different combination

So if you had a product where you can set the following attributes:

upholstery, base, arms headrest, back

That is 5 different attributes. If each one of those attributes has 5 options, that is 25 different possible combinations assuming the user has to select all 5 options. If the user doesn't have to select all 5 options then there are even more possible combinations.

So even if you only actually created 2 variations for this product, the woocommerce_ajax_variation_threshold would still see this products threshold as 25 meaning 25 possible options.

I think by default the woocommerce_ajax_variation_threshold is set to 10.

So to fix this, set the woocommerce_ajax_variation_threshold to a higher value. If your product has 30 possible combinations(whether they actually exist or not) set the threshold to something higher than 30, like 1111 for example.

You can use the snippet below in your functions.php file.

 /* Increase Woocommerce Variation Threshold */
 function wc_ajax_variation_threshold_modify( $threshold, $product ){
  $threshold = '1111';
  return  $threshold;
add_filter( 'woocommerce_ajax_variation_threshold','wc_ajax_variation_threshold_modify', 10, 2 );

Need Your Help

How can I iterate over files in a given directory?

python iterator directory

I need to iterate through all .asm files inside a given directory and do some actions on them.