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