Variation combination showing which aren't available
-
Hey,
I got a b2b shop with woocommerce and the woodmart theme. There I got boots with 2 attributes to select from with different possiblities (8×71). Not every of these are available, so I want the other selection to update which are available. Iam importing all of these variations with WPAllimport, which works fine I think.
Let’s say they got the attributes color and size. 71 colors and 8 sizes. The size “3” is available in 8 colors. So if I choose size 3 in the dropdown, the other selection dropdown should update to only show these 8 available colors and not all 71.
This doesn’t work here. Do you have any idea how I could manage to do that?
Hello,
Try to add the following PHP code snippet to the child theme functions.php
function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 150;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
This will increase the standard WooCommerce variations number to be loaded with AJAX from 150.
Kind Regards
That seemed to work. Thank you very much!
You are welcome! If you have any questions please feel free to contact us.
Best Regards
The topic ‘Variation combination showing which aren't available’ is closed to new replies.