• Resolved bassplayer84

    (@bassplayer84)


    Hello,

    i know there is no limit in product variations, but there is the limit of creating 50 per time.
    How to increase this limit?

    I read on some forums to add this line:

    define( ‘WC_MAX_LINKED_VARIATIONS’, 100 );

    but where? in theme function.php it won’t do anything but appearing this code in the website fronted.

    Any other help?

    thanks

    https://www.ads-software.com/plugins/woocommerce/

Viewing 3 replies - 16 through 18 (of 18 total)
  • Seeking advice if a hidden product field or product variations or something else is the right approach…. I am trying to do the following.

    I have over 650 teams that need to pay a one time annual local registration fee with new, additional teams showing up daily. Each team has a unique team number created by the national organization (completely separate organization) and 2 team managers. I separately download the current valid team list from the national site and place into a local separate database.

    I need to make it easy for someone to pay their local registration fee and also track which teams have paid (and need the team number in the cart/checkout). Note that a person could be managing more than 1 team. I just need to make sure that the team number is valid (It is okay if someone other than the manager pays for a team – a warning message would be nice if the manager was not the same as the person paying just to confirm that they are paying for the correct team but if that is hard to do, I am okay with skipping this check).

    I was able to generate the team list that shows last year’s payment status (along with other information that I am separately collecting from team). I am trying to get this integrated this year into wordpress/woocommerce instead as a completely separate process. [Last year’s team list is https://www.norcalfll.org/test-team-database/ ] If you look at the page, in the status table for each team, I would like to have a “Pay Now” link for teams that have not paid.

    What I think would be best, is to have the manager click on their team status, and then recognize that the team has not yet paid (which I know how to do in my plugin) and have a “Pay Now” button show up that would add the registration product with correct team number directly to a shopping cart. I would then like to give the manager an option to add additional teams [assume I could redirect to team list from the continue shopping link] as well as for a donation to support the local program [assume this could use the existing cross-sell functionality].

    I have tried to do this with woocommerce as well as looked at several of the paid plugins but none see to do what I need and are pretty expensive for a small all volunteer nonprofit. I am really struggling as a newbie wordpress / woocommerce person and seeking ideas on the best way to implement and/or if one of the existing plugins has this capability. If I had to pay for a plugin, does anyone know if there is a nonprofit rate that is available?

    Thanks much, Jill

    Just noticed that this is marked resolved/closed. Will post as a new topic

    Try editing plugins/woocommerce/includes/class-wc-ajax.php around line 894 max variations from 49 to say 299.

    You may need to increase memory limits also as creating variations will take allot longer than when it was set to only create 50 varitions at ones.

    I had tried adding the filter at wp-config and funtions.php and also tried the theme functions.php but they didnt work so editing the file directly seems to work.

    If you can find the class-wc-ajax.php you can run a search for 49 and it should take you to the line that the limit is set.

    Be sure to back up any file you work on incase it breaks the site.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘How to create more than 50 variations for execution’ is closed to new replies.