Development alpha.3 — local testing
Campaign unit quotas
Working version: 0.1.0-alpha.3. Local development feature, not a production release. This guide describes the current implementation; the public website download may contain an older version.
Limit the total number of discounted units
Open HookSpark → Pricing & Discounts, create or edit a promotion, and locate Discounted units across this campaign (0 = unlimited). Enter a whole number and save. Keep zero to leave the campaign unlimited. Existing promotions default to zero.
This is a total across orders for this promotion, not a maximum per cart or a count of customers. Product selection, eligibility, dates and discount calculation still apply.
| Promotion | Order | Units charged to this campaign's quota |
|---|---|---|
| 10% off every matching item | 12 matching items | 12 |
| Buy 2, get 1 free, repeated | 6 items, including 2 rewards | 2 |
| Progressive reduction from the fifth item | 6 items, only the final 2 discounted | 2 |
| Two stacked promotions | Each discounts the same 3 items | 3 for each campaign separately |
Products that only trigger a Buy/Get promotion do not use reward quota. Automatic free gifts do count. Quota and stock are separate constraints; a quota does not create product stock. Min/Max still validates the physical quantities in the order.
What shoppers experience
Adding a product to the cart does not reserve campaign availability. The current product preview and simulator do not guarantee that quota remains available.
Checkout reserves the order's complete allocation for 15 minutes. If insufficient units remain, checkout stops with a message asking the shopper to return to the cart and review quantities. It does not silently apply a partial promotion. Two local simultaneous checkouts were tested with capacity for one order: exactly one succeeded, on both classic checkout and Store API.
A repeated checkout replaces that order's pending allocation. Removed campaigns no longer retain its pending units. If any required campaign lacks capacity, the replacement does not partially succeed.
Confirmation, expiry and cancellation
Pending holds expire after 15 minutes. An on-hold order does not extend this reservation or consume the quota permanently. After expiry, another order can use those units; a later confirmation must check availability again. An order moving through WooCommerce's processing/completed or payment-complete callbacks consumes the allocation permanently. Repeating the callbacks does not multiply usage.
Processing is not proof of money received. Cash on delivery can enter processing before collection; its allocation is consumed at confirmation too.
Cancelled or failed orders release pending holds. Already consumed allocations are not automatically returned by cancellation or refund in this implementation. Do not assume a monetary refund increases quota. Refund/restocking policy for consumed quota remains unfinished.
A late confirmation rechecks capacity. If enough units remain, it confirms the allocation without a review warning, even if the original reservation expired. If it cannot confirm the allocation, the order keeps its status and is marked for review. No automatic refund, cancellation or payment reversal is performed.
Resolve “Promotion quota needs review”
- Open the order and read the warning and internal order note before fulfillment.
- Check why availability is unavailable or whether storage needs attention. Do not assume the payment failed because quota confirmation failed.
- After availability is restored, choose Recheck promotion quota in WooCommerce's Order actions and apply it.
- The warning clears only when the allocation is confirmed. Otherwise it remains.
The action preserves the order’s original unit allocation and checks the campaign’s current limit. For example, if two units are already consumed and an order needs another two, increasing the limit from 2 to 4 allows its allocation to be confirmed on recheck. This does not rewrite the historical quantities or prices. If the campaign has been deleted, the saved capacity remains the fallback. Lowering the limit does not revoke already confirmed allocations. If the new limit is below current usage, further allocations cannot be confirmed. Setting the limit to zero makes the campaign unlimited; rechecking an existing flagged order still records its exact units. There is no manual quota-reset control in this version. Only an authorized order editor can run the recovery action.
Current limits before release
- Browser layout, keyboard operation and native action submission still need visual acceptance.
- Product price examples now explain limited or insufficient allowance without displaying internal campaign names or exact remaining capacity. They do not reserve units; full-cart availability can differ. The simulator shows availability for the selected limited campaigns, warns when it is insufficient, and explicitly reports a failed availability check. It does not reserve units. The saved campaign editor also shows current usage and pending holds; visual acceptance remains open.
- Local HTTP tests use cash on delivery; native on-hold transitions and expiry/reallocation are tested using temporary orders and an aged reservation timestamp. Remote gateways and their delayed callbacks are not validated.
- Upgrade/migration, cleanup retention and consumed-quota return policy need completion.
- Historical snapshots lacking exact unit allocations are not estimated or backfilled.
See the current controls
