hardening 2.3: 2meet-data-optimizer-woocommerce-addon 0.3.0 (commissions follow refunds) #4

Merged
wpdev merged 4 commits from hardening/2.3 into main 2026-09-27 18:37:33 +08:00

4 Commits

Author SHA1 Message Date
wpdev d9d3556579 docs(2meet-data-optimizer-woocommerce-addon): add PR-112 to the 0.3.0 release notes
Tests / PHP Lint (pull_request) Successful in 16s
Tests / Unit Tests (pull_request) Successful in 1m31s
Tests / Integration Tests (pull_request) Successful in 1m57s
- PR: PR-103 (follow-up)
2026-09-27 17:34:19 +08:00
wpdev c2bd02e9ec fix(2meet-data-optimizer-woocommerce-addon): record no negative commission for a fully refunded taxed order
- 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)
2026-09-27 17:23:31 +08:00
wpdev 22afabc649 docs(2meet-data-optimizer-woocommerce-addon): 0.3.0 release notes
- 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
2026-09-27 16:50:29 +08:00
wpdev 50989396a8 fix(2meet-data-optimizer-woocommerce-addon): recompute commission amounts on every tracked status change and refund
- 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
2026-09-27 16:29:28 +08:00