Table of Contents
The Pro version allows you to set purchase limits on a more granular level #
Per Product Taxonomy #
- Per product tag: Enable this option to set individual limits for product tags. A new meta box will appear on each product tag edit page for defining limits.
- Per product category: Similar to tags, you can enable this option to set limits on product categories. A new meta box will be added to each product category edit page.
- Per Product: Enable this option to set individual purchase limits for specific products. A new meta box will be added to each product edit page for defining limits.
Limits by Formula (Advanced) #
This section provides an alternative approach for setting limits using formulas #
- Enable: Activate this option to define limits based on shortcodes.
- Formula: Enter one shortcode per line.
Notes #
- Use the [alg_wc_mppu] shortcode within the formula.
- The algorithm stops when it encounters the first matching shortcode (read top to bottom).
Available shortcode attributes include #
- user_id: Specify user ID(s).
- user_role: Define user role(s).
- membership_plan: (Requires additional integrations) Set limit based on membership plans.
- (and several more related to memberships and payment methods)
- product_id: (Requires enabling “Per product”) Set limit for specific product(s).
- term_id: (Requires enabling relevant taxonomy) Set limit for specific categories/tags.
- limit: This attribute is mandatory and specifies the limit value.
Important notes regarding attribute usage #
- product_id (and related attributes) can only be used with the “Per product” option enabled.
- term_id can only be used with the corresponding taxonomy (“Per product category” or “Per product tag”) enabled.
- payment_method requires enabling “Count by current payment method” and potentially disabling “Validate on add to cart” and “Block checkout page” for smoother checkout.
- product_id and term_id cannot be used simultaneously in the same shortcode.
- You can define a timeframe for the shortcode using start_date, end_date, and not_date_limit attributes.
- product_limit_meta can only be used in combination with product_id.
Examples #
- [alg_wc_mppu limit=”18″ user_id=”2,5″]: Sets a maximum limit of 18 for users with IDs 2 and 5.
- [alg_wc_mppu limit=”18″ user_id=”2,5″ product_id=”100,110″]: Sets a maximum limit of 18 for products 100 and 110 for users with IDs 2 and 5.