- The discount follows the billing email, the address the order is
placed under. The tracked session email used to win, so a guest could
post a discounted address to the tracking endpoint and check out under
their own, keeping the discount.
- Shipping packages carry the matched assignment, so WooCommerce's
per-package rate cache no longer reuses rates filtered for a matched
address (free shipping, reserved methods) after the email changes.
- The anonymous tracking endpoint no longer answers matched: true|false,
which let anyone enumerate discounted addresses and domains.
- CF-Connecting-IP is believed only from a Cloudflare edge range or a
private/loopback proxy. From anyone else it let a direct client pick a
new address per request: no REST rate limit, forged audit-log IPs.
Smoke tests: 89 assertions (was 73), each fix with its own.
Co-Authored-By: Claude Opus 5.5 <[email protected]>