Website Building » WooCommerce » How Do I Increase Variation Limit in WooCommerce?

How Do I Increase Variation Limit in WooCommerce?

Last updated on January 20, 2023 @ 12:14 pm

If you’re a WooCommerce user, you’ve probably noticed that there’s a limit to the number of variations you can create for a product. By default, that limit is 30. But what if you need to create more than 30 variations for a product?

Fortunately, there’s a way to increase the variation limit in WooCommerce. You just need to add a few lines of code to your functions.php file.

PRO TIP: If you are planning to increase the variation limit in WooCommerce, it is important to note that this can result in decreased performance on your site. Additionally, it is recommended that you create a backup of your site before making any changes.

Here’s the code you need to add:

function wc_max_variation_count( $count ) {
  return 100; //Change this number to however many variations you want to be able to create
}
add_filter( 'woocommerce_max_variation_count', 'wc_max_variation_count', 10, 1 );

Once you’ve added that code, you’ll be able to create up to 100 variations for a product. If you need even more than that, just change the “100” in the code to whatever number you want.

Conclusion: How Do I Increase Variation Limit in WooCommerce?

You can easily increase the variation limit in WooCommerce by adding a few lines of code to your functions. Just change the number in the code to however many variations you need to be able to create.

Dale Leydon

Dale Leydon

Sysadmin turned Javascript developer. Owner of 20+ apps graveyard, and a couple of successful ones.