View Categories

Formula Shortcode Attributes Reference

The Pro Formula section of Maximum Products per User for WooCommerce uses the [wpfmppu] shortcode, one rule per line, to set limits programmatically. This page lists every recognized attribute. The old [alg_wc_mppu] tag is a deprecated alias as of version 4.5.0.

Attributes #

Attribute Description Requires
limit Maximum allowed. Required on every rule. –
user_id One or more user IDs (comma-separated). –
user_role One or more user roles. –
membership_plan WooCommerce Memberships plan. Memberships plugin
memberpress_plan_id MemberPress plan ID. MemberPress
sumo_membership_plan SUMO Memberships plan. SUMO Memberships
swpm_membership_id Simple Membership plan ID. Simple Membership
payment_method Current payment method. Count by current payment method
product_id One or more product IDs. Per product enabled
product_sku One or more product SKUs. Per product enabled
is_downloadable Match downloadable products. Per product enabled
is_virtual Match virtual products. Per product enabled
term_id One or more category/tag IDs. Per taxonomy enabled
product_limit_meta Use a product meta value as the limit. Only with product_id
start_date, end_date Limit the rule to a date window. –
not_date_limit Invert the date window. –

Rules to remember #

  • The algorithm reads top to bottom and stops at the first matching rule.
  • You cannot use product_id (or product_sku/is_downloadable/is_virtual) and term_id in the same rule.
  • Every rule needs a limit.

Examples #

  • [wpfmppu limit="2" user_role="customer" product_id="100"]
  • [wpfmppu limit="10" user_role="wholesale"]
  • [wpfmppu limit="5" term_id="77" start_date="2026-11-01" end_date="2026-11-30"]

Ready to set this up? #

The Formula section is a Pro feature of Maximum Products per User. Get Maximum Products per User Pro.