---
title: Formula Shortcode Attributes Reference
description: "Every attribute of the [wpfmppu] formula shortcode for WooCommerce purchase limits, with rules and examples. Pro."
url: "https://wpfactory.com/docs/maximum-products-per-user-formula-attributes/"
updated: "2026-09-27"
category: References
---

# Formula Shortcode Attributes Reference

The Pro **Formula** section of [Maximum Products per User for WooCommerce](https://wpfactory.com/item/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](https://wpfactory.com/item/maximum-products-per-user-for-woocommerce/). [Get Maximum Products per User Pro](https://wpfactory.com/item/maximum-products-per-user-for-woocommerce/).

Related articles

- [Maximum Products per User: Message Placeholders Reference](https://wpfactory.com/docs/maximum-products-per-user-placeholders/)
- [Maximum Products per User: Developer Hooks and Filters Reference](https://wpfactory.com/docs/maximum-products-per-user-hooks-filters/)
- [Product Purchase Limit Shortcodes](https://wpfactory.com/docs/product-purchase-limit-shortcodes/)
- [How to Set Purchase Limits by Formula (and When to Use Them)](https://wpfactory.com/docs/max-products-per-user-formula-limits/)
