Increase Default Product Variations in WooCommerce
There are case by case instances where you might want to change the number of default product variations. By default, WooCommerce only allows for 30 product variations.
The good news is that you can add a simple code snippet in your theme’s functions.php file.
Add the code below to your theme’s functions.php file and change the number for the number of variations you want to for your products.
function custom_wc_ajax_variation_threshold( $qty, $product ) {
return 10;
}
add_filter( 'woocommerce_ajax_variation_threshold', 'custom_wc_ajax_variation_threshold', 10, 2 );
With this code now in your functions.php file, you can modify the amount whenever you want.
We pride ourselves on being The Most Helpful Humans In Hosting™!
Our support staff is always available to assist with any issues related to this article, 24 hours a day, 7 days a week 365 days a year.
We are available, via our ticketing systems at support@liquidweb.com, by phone (at 800-580-4986) or via a LiveChat or whatever method you prefer. We work hard for you so you can relax.
Related Articles:
About the Author: AJ Morris
AJ Morris is the Product Innovation and Marketing Manager at iThemes. He’s been involved in the WordPress community for over a decade focusing on building, designing and launching WordPress websites and businesses.
Our Sales and Support teams are available 24 hours by phone or e-mail to assist.
Latest Articles
How to Use React Spring
Read ArticleAccessing Man Pages on Ubuntu 16.04 LTS
Read ArticleTLS vs SSL: A Comparison
Read ArticlePremium Business Email Pricing FAQ
Read ArticleMicrosoft Exchange Server Security Update
Read Article