By default, the variations threshold is 30. If the number of variations is less than the threshold, WooCommerce uses AJAX to check the available variations and the customer is only able to select available variations. If the number of variations is greater than the threshold, AJAX isn’t used, and variations that aren’t available will be displayed.
If you have more than 30 variations for a product, you can increase the threshold by adding the following code to your child theme’s functions.php, replacing the “150” with whatever you need, but keeping in mind the higher the number, the more resource-intensive the AJAX call:
add_filter( 'woocommerce_ajax_variation_threshold', 'wc_ajax_variation_threshold' );
function wc_ajax_variation_threshold() {
return 150;
}
hello, actually I don’t mean the options available for each variation, I mean the attributes front-end example
product1
pa_attribute 1 (op1, op2)
pa_attribute 2 (op1, op2)
pa_attribute 3 (op1, op2)
what I want is that when pa_attribute 1 (op1) is chosen, pa_attribute 3 is not displayed