woocomerce variations [closed]

Just to clarify, there is no limit to 50 variations for one product in Woocommerce – this is a big misunderstanding.

You certainly can have way more variations than that. I have done it myself numerous times and never had a problem. For a overview concerning variations take a look at the woocommerce documentation: Product Variations.

As far as the limit goes, this concerns the possibility to automatically link variations: Linking possible variations. There it says:

Instead of adding each variation one at a time, you can click the ‘link all variations’ button. This will create a new variation for each and every possible combination of variation attributes (max 50 per run).

The important part is »max 50 per run« – what this means is, that you have to run it several times if your selection of attributes leads to more possible variations. The limit is there to »to prevent memory issues« – additionally see @brasofilo’s answer.

Additional information: @brasofilo’s answer refers to a rather old version, keep that in mind; @shamim539’s refers to the newer 2.x version, but can be improved.
The code sample he gave is inside a conditional, that checks if the variable has been defined – take a look:

if ( ! defined( 'WC_MAX_LINKED_VARIATIONS' ) ) {
    define( 'WC_MAX_LINKED_VARIATIONS', 49 );
}

So there is no need to do the change inside the woocommerce-ajax.php file, this will be overridden on plugin updates anyway. Just define the variable inside your functions.php:

    define( 'WC_MAX_LINKED_VARIATIONS', 249 );

But: If you are going to increase the limit be sure your server can handle the increased limit.

If you have problems saving large amounts of data – like @user1418998 suggested – this is documented as well: Problems with large amounts of data not saving (variations, rates etc).

Leave a Comment