Call Us : +1-678-551-2452
+91 77381-86899

Disable unavailable variations in drop down list of variable product woocommerce

In my site when I added couple of variations it was showing as expected the unavailable variations were note being displayed in the drop down list but when I crossed limit 30 of variations, even the unavailable variations were being displayed and while making the selection it showed message “sorry, no variation available, choose different” .

to resolve this I added below line of code in functions.php file of theme

function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 100;

add_filter( ‘woocommerce_ajax_variation_threshold’, ‘custom_wc_ajax_variation_threshold’, 100, 2 );

This code will override the default variation threshold and will not display the unavailable variations


Leave a Reply

Pay with PayPal

Icon Web Solutions Service
Other Amount:


It has been a great pleasure working with Icon Web Solutions on the development of my digitized logo and website. From the initial phases of web design, the Icon Web Solutions team has been a pleasure to work with
Naren, USA