Increase Default Product Variations in WooCommerce

Reading Time: < 1 minute

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.

Author Bio

About the Author: AJ Morris

AJ Morris is the Product Manager for Liquid Web’s Managed WordPress/WooCommerce Hosting. He’s been involved in the WordPress community for over a decade focusing on building, designing and launching WordPress websites and businesses.

Refer a friend and get a $50 hosting credit!