- the amounts follow Marketplace::get_order_profit() (what the vendor is
paid), which subtracts the full order tax after refunds; a fully refunded
taxed order came out at subtotal = commission = -tax. The subtotal is now
floored at 0 (security review M2); partial refunds keep matching what
Marketplace pays
- Verify: WCOrdersInterceptorTest (full refund with tax), integration 28, unit 11, phpcs
- PR: PR-112 (2.3 acceptance security review)
- version 0.3.0; CHANGELOG for PR-092 (commissions follow refunds), with the
note that older rows are corrected on the order's next event
- Verify: composer test (11)
- PR: PR-103
- the commission upsert replaces subtotal, commission, vendor_payout and
commission_rate on conflict (it kept the first amounts, so a partial refund
before completion never reached the row)
- woocommerce_order_refunded recomputes a tracked or already recorded order;
a fully refunded order keeps its row at zero, untracked orders get none
- Verify: WCOrdersInterceptorTest (5 new), integration 27, unit 11, phpcs;
dev36 flow_wc partial refund -> completed
- PR: PR-092
- Stop registering WC product/order/subscription zone fields and the user hot group; WC reads its meta directly and writes stock by SQL, so a flat copy drifts
- Keep the custom tables registration, the HPOS notice and the commissions
- Verify: composer test / test:integration; dev36 customer save, order stock reduce/restore with no DB errors
- PR: PR-085
- Version 0.1.1 for the hardening 2.0 changes that shipped without a version bump
- CHANGELOG: Marketplace commission keys fix (hp_vendor / hp_commission_rate / hp_commission_fee)
- Verify: composer test (10 OK)
- Marketplace writes hp_vendor / hp_commission_rate / hp_commission_fee (no
underscore); the _hp_* keys never existed, so no commission was recorded
- Compute subtotal, vendor payout and commission the way
Marketplace::get_order_profit() does, honouring hp_vendor_include_taxes
- Store the vendor's user ID, the product's parent listing, and the platform
commission percentage (Marketplace stores the vendor share, e.g. 0.9)
Verify: phpunit-integration --filter WCOrdersInterceptorTest (4 tests);
WC unit 10 OK, integration 22 OK
PR: PR-012