This post was last updated on April 22nd, 2017 at 11:55 am
Initially, you might have thought that you can add 50 variations to products in WooCommerce. This is not true, you certainly can have way more variations than that. The important part is “max 50 per run” (by default, you can add only 50 at a time) – what this means is, that you have to run it several times if your selection of attributes leads to more possible variations.
How to increase WooCommerce product variations limit
just define the following variable inside your:functions.php
(not in wpconfig.php).
//Increase in the number of variations to 150
define( 'WC_MAX_LINKED_VARIATIONS', 100 );
Note: If you are going to increase the limit be sure your server can handle the increased limit. Because WooCommcerce set this limit to prevent memory issues.
6 Comments
You can post comments in this post.
You can’t copy your code easily, it just copies “read more…”
Craig Brown 7 years ago
The comment says the code would increase in the number of variations to 150
But the value declared in the parameter is 100. Shouldn’t that be 150?
Josh Muller 6 years ago
Thank you dude!!!
Basil 6 years ago
It worked perfectly!! watched this video to know how to do it step-by-step
youtu.be/mEguB7lihAc
Cesar Paniagua 5 years ago
Thank you for this in-depth tutorial. I am trying to work on product variations but not getting the actual results as I have already gone through several resources and following this resource wpitech.com/wooco…variation/ to implement the product variation process. Can you please describe me further how to do this? This is the code that I think is somehow wrong. Is there any other way to set product variations?
$variation_id = woo_insert_post( $variation_post );
$variation = new WooCommerce_Product_Variation( $variation_id );
foreach ($variation_data['attributes'] as $attribute => $term_name )
JAMES 5 years ago
This worked for me! thank you.
Erasmo 4 years ago
Leave A Reply