WooCommerce 30 + Variation Not Working [How-To Fix]

Optimization and flexibility WooCommerce have made this platform more and more popular amongst online store developers. Based on it WordPress, WooCommerce is an ideal plugin for anyone who wants to create an online store from scratch. It has a very good indexing rate (SEO), does not require many system resources on the host servers (if configured for WooCommerce) and is easy to given. In addition, it offers multiple options stock management, produced codesEtc. attributes si variations.

Many would say WooCommerce is not thinking about giant online stores (most likely not), but from experience we can say that it is easy to carry over 10.000 products without putting an extraordinary load on the servers. This depends, of course, on how the host server is configured. We recommend NGINX + PHP-FPM on a server, and SQL on another server.
In WooCommerce, however, there is a limitation that few know about. To a number of fish 30 variations, the selection fields do not count attribute combinations. There is no panic, because if the attribute combination is not managed, the product can not be ordered. But it can be a problem for customers. They will have to guess which combination of attributes is in stock.

How do the attributes in WooCommerce work normally and over 30 variations

In WooCommerce, there is no option to change the allowed variance limit, but we can do this by editing the functions.php file of the WordPress theme on which the online store works.
Add the following line to "/path/wp-content/themes/wootheme/functions.php".

function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 200;
add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 100, 2 );

Preferably add the above line to the end of the existing code lines in the WooCommerce active theme. After saving, you see that the limit of 30 variations has changed, and combinations of attributes go smoothly.

WooCommerce 30 + Variation Not Working [How-To Fix]

About the author


Passionate about everything gadget and IT, I write with pleasure on stealthsettings.com since 2006 and I like to discover with you new things about computers and operating systems macOS, Linux, Windows, iOS and Android.

Leave a Comment