Increasing variation filter
-
I am trying to increase the default variation filter, so that only the available variations for each attribute are shown.
For example, a t-shirt is available in 6-9 months, but a romper is not, but the site will still show the option for 6-9 months. When a romper in 6-9 months is selected, the following message will show on the site “Sorry, no products matched your selection. Please choose a different combination.”
I want it so that when 6-9 months is selected, a romper will not be available to select.
I have created a child theme and used the following code, with no success
add_filter( ‘woocommerce_ajax_variation_threshold’, ‘wc_ninja_ajax_threshold’ );
function wc_ninja_ajax_threshold() {
return 190;
}
- The topic ‘Increasing variation filter’ is closed to new replies.