I recently came across a situation where a Client needed over 100 variations with certain variations only being specific to a particular attribute. This means I needed to create the variations dynamically and then individually delete each variation that was not relevant to the particular attribute.
This worked fine until there were more than 30 variations. In fact, I found when the amount of variations was above 30 I found every variation in the dropdown list was showing for any attribute selected.
This racked my brain and I found that it kept breaking at 30! Why 30?
Well, it seems that by default, this is a magic figure embedded into the WooCommerce filter linking to the Ajax Threshold when populating the dropdown variations.
To increase this we simply need to hook into the woocommerce_ajax_variation_threshold filter.
The best way to do this is to either manually add the code below to your functions.php (preferably your child theme), or install a plugin like Code Snippets.
add_filter( 'woocommerce_ajax_variation_threshold', 'wc_ninja_ajax_threshold' ); function wc_ninja_ajax_threshold() { return 100; }