1.8.0: a coupon can carry a group's shipping rules #4

Merged
kw merged 1 commits from shipping-only into main 2026-11-17 13:14:59 +00:00
Owner

Shipping Rules gets a per-group "Coupon codes" field: a customer with one of those coupons in the cart gets the group shipping methods (incl. "Only"), whatever their email. Shipping only, not the group percentage. Email group match still wins. Package key carries the effective group so the WC rate cache follows the coupon.

Asked for on garageristeriet.dk: teamnetic coupon users must see the Netic free-delivery methods.

Local: static green, site-test 100/100; planted fault (coupon branch removed) turns two assertions red.

🤖 Generated with Claude Code

Shipping Rules gets a per-group "Coupon codes" field: a customer with one of those coupons in the cart gets the group shipping methods (incl. "Only"), whatever their email. Shipping only, not the group percentage. Email group match still wins. Package key carries the effective group so the WC rate cache follows the coupon. Asked for on garageristeriet.dk: teamnetic coupon users must see the Netic free-delivery methods. Local: static green, site-test 100/100; planted fault (coupon branch removed) turns two assertions red. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kw added 1 commit 2026-11-17 13:08:29 +00:00
1.8.0: a coupon can carry a group's shipping rules
CI / WordPress latest + WooCommerce latest on PHP 8.3 (pull_request) Successful in 1m11s
Compatibility / WP latest / WC latest / PHP 7.4 (pull_request) Skipped
Compatibility / WP latest / WC beta / PHP 8.3 (pull_request) Skipped
Compatibility / WP latest / WC latest / PHP 8.3 (pull_request) Skipped
Compatibility / WP nightly / WC latest / PHP 8.3 (pull_request) Skipped
Compatibility / WP latest / WC latest / PHP 8.4 (pull_request) Skipped
Compatibility / Keep the compatibility headers honest (pull_request) Skipped
CI / Static checks (pull_request) Successful in 4m26s
654d8632d2
Shipping Rules gets a "Coupon codes" field per group. A customer with one
of those coupons in the cart gets the group's shipping methods, including
"Only" ones, whatever their email. Asked for on a live shop: free delivery
reserved for one company's addresses had to reach people using that
company's coupon too.

Only the shipping follows the coupon; the group's percentage discount
stays with its email assignments. An email assigned to a group still
wins. The shipping package key now carries the effective group, so
WooCommerce's rate cache follows a coupon being added or removed.

Stored as groups.shipping_coupons (dbDelta adds the column on update).
Smoke tests: 100 assertions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kw added 1 commit 2026-11-17 13:08:30 +00:00
1.8.0: a coupon can carry a group's shipping rules
CI / WordPress latest + WooCommerce latest on PHP 8.3 (pull_request) Successful in 1m11s
Compatibility / WP latest / WC latest / PHP 7.4 (pull_request) Skipped
Compatibility / WP latest / WC beta / PHP 8.3 (pull_request) Skipped
Compatibility / WP latest / WC latest / PHP 8.3 (pull_request) Skipped
Compatibility / WP nightly / WC latest / PHP 8.3 (pull_request) Skipped
Compatibility / WP latest / WC latest / PHP 8.4 (pull_request) Skipped
Compatibility / Keep the compatibility headers honest (pull_request) Skipped
CI / Static checks (pull_request) Successful in 4m26s
654d8632d2
Shipping Rules gets a "Coupon codes" field per group. A customer with one
of those coupons in the cart gets the group's shipping methods, including
"Only" ones, whatever their email. Asked for on a live shop: free delivery
reserved for one company's addresses had to reach people using that
company's coupon too.

Only the shipping follows the coupon; the group's percentage discount
stays with its email assignments. An email assigned to a group still
wins. The shipping package key now carries the effective group, so
WooCommerce's rate cache follows a coupon being added or removed.

Stored as groups.shipping_coupons (dbDelta adds the column on update).
Smoke tests: 100 assertions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kw merged commit c2df6a0b48 into main 2026-11-17 13:14:59 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kw/nolimit-discounts#4