Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 5 years ago.
Improve this questionI 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.
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 5 years ago.
Improve this questionI 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 Answer
Reset to default 1I 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;
}