- 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)
- 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
- 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