How can I limit the purchase to the customer who does not have any membership?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #100866
    veronica
    Guest

    All my user_roles are customers but I dont want to have to force all users to be on a membership so can I limit those who do not have a membership?

    [alg_wc_mppu limit="10" term_id ="161" membership_plan="advanced-membership"]
    [alg_wc_mppu limit="3" term_id ="161" membership_plan ="-1"]
    

    I want to only place limits on people who do not have memberships and let the others memberships have no limits or counters.

    [alg_wc_mppu limit="10" term_id ="161" membership_plan="advanced-membership"][alg_wc_mppu  limit="0" term_id ="161" membership_plan="unlimited-membership"]
    [alg_wc_mppu  limit="0" term_id ="161" membership_plan="lifetime-membership"]
    [alg_wc_mppu limit="3" term_id ="161" membership_plan ="-1"]
    
    #100867
    Pablo
    Moderator
    Plugin Support

    All my user_roles are customers but I dont want to have to force all users to be on a membership so can I limit those who do not have a membership?

    You can simply add the shortcodes starting with the more specific to the ones more generic, because the algorithm stops when the first matching shortcode is found (from top to bottom).

    So, considering your example, I think it would work like this:

    [alg_wc_mppu limit="10" term_id="161" membership_plan="advanced-membership"]
    [alg_wc_mppu limit="3" term_id="161"]
    

    I want to only place limits on people who do not have memberships and let the others memberships have no limits or counters.

    The same thing. You can start with the shortcodes containing the more specific rules, i.e., the memberships, and at the end you can add generic limits. There is no need to use the -1 on membership_plan. Example:

    [alg_wc_mppu limit="0" term_id ="161" membership_plan="unlimited-membership"]
    [alg_wc_mppu limit="3" term_id ="161"]
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.