-1

I have a problem with WooCommerce showing out of stock items as in stock. This is for a T-Shirt customization site. Some variations have more than 500 variations. Some items when click show as in-stock and it does not display a warning. How can I stop users from selecting out of stock items in large variations.

I changed php.ini max_input_vars to 20000 but that does not fix the issue.

1

I was able to fix the issue by simply adding the following to functions.php

add_filter( 'woocommerce_ajax_variation_threshold', 'wc_ninja_ajax_threshold' ); 
function wc_ninja_ajax_threshold() {
    return 1000;
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.