WooCommerce auto-apply coupons
Automatic promotions without inventing fake discounts.
Auto Apply is an application mode for a real WooCommerce coupon. PerkRule discovers bounded candidates, validates them through the normal rule path and applies eligible coupons using WooCommerce APIs.
OWNERSHIP
Only remove automatic mutations PerkRule actually owns.
The runtime records which coupons were successfully applied automatically. A manually entered coupon remains protected even when that coupon is configured for automatic application.
PROVENANCE, NOT A FLAG
The application-mode setting says what PerkRule may try; ownership records what PerkRule actually changed.
Those are deliberately different concepts. A coupon can be configured for Auto Apply and still be present because the customer typed it manually. PerkRule records ownership only after a successful automatic application through WooCommerce. It may later remove an obsolete promotion only if that explicit provenance still exists. Removing the coupon clears provenance, which prevents a later manual re-application from being mistaken for an old automatic mutation.
CUSTOMER INTENT
Manual and unrelated coupons are constraints around reconciliation, not disposable obstacles.
If an automatic candidate conflicts with a coupon already applied by the customer, the resolver does not evict the customer's coupon to make the automatic promotion fit. Protected codes are captured before selection and remain protected through conflict resolution. That matters especially for individual-use and exclusive behavior, where an aggressive automation engine could otherwise create a frustrating loop of removing what the shopper entered and replacing it with what the plugin preferred.
BOUNDS
No partial behavior when candidate discovery overflows.
Candidate discovery is intentionally bounded. If the configured safety capacity is exceeded, PerkRule fails safely instead of applying an arbitrary partial subset.
HARD CAPACITY
Candidate discovery asks for one sentinel beyond the limit so overflow is explicit instead of invisible.
The current source requests at most 101 matching published coupon IDs for a hard working capacity of 100. The 101st result is not processed as 'close enough'; it signals that the candidate set exceeded the architecture's current bound. In that state PerkRule performs zero partial reconciliation. Applying the first hundred coupons while silently ignoring the rest would make outcome depend on query order and would be much harder for a store owner to diagnose.
WHY BOUNDS MATTER
Auto Apply runs inside a lifecycle that can be triggered repeatedly, so predictable work matters as much as fast work.
Cart totals can recalculate multiple times during one request and again as checkout facts change. PerkRule uses a narrow re-entry guard and request-local state fingerprints to avoid uncontrolled nested or cyclic reconciliation. The goal is not to pretend every store has fewer than one hundred automatic promotions forever; the larger-capacity design is tracked separately. Until it exists, the safe behavior is to stop explicitly rather than degrade into an unbounded scan.
INDIVIDUAL USE
Native WooCommerce constraints still win.
Individual-use coupons are treated conservatively so automatic promotion behavior does not evict or weaken protected manual coupon state.
WOO RULES STILL APPLY
Automatic application does not grant permission to weaken WooCommerce's individual-use semantics.
A coupon marked individual-use is a native constraint. PerkRule's conflict layer can make automatic selection more restrictive, but it cannot use its own priority or stacking metadata to pretend WooCommerce's rule does not exist. If the current cart contains a protected manual coupon that makes an automatic individual-use candidate incompatible, the automatic candidate loses rather than evicting the protected state.
FINAL VALIDATION
Even after PerkRule selects a candidate, WC_Cart::apply_coupon() performs the real application.
Selection is not monetary ownership. PerkRule can decide that a coupon is the desired automatic promotion, but the public WooCommerce application path still performs native validation and updates the real cart. Success and error notice filtering is temporarily scoped only to the active automatic subject so automation does not pollute the shopper's notice queue. The plugin never speculatively applies a coupon merely to discover whether it would work.
Auto Apply is only useful when conflicts stay predictable.
See how Product 001 combines automatic application with priority and stacking.
Explore Product 001PerkRule support room
Real support works better when people can talk.
The PerkRule Discord will be the direct place for setup questions, bug reports, compatibility notes and release discussion. Useful answers should not disappear into private tickets — recurring problems can become documentation and Engineering Notes.
Discord opens around Product 001 release