Commit Graph

16 Commits

Author SHA1 Message Date
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
wpdev 6294ee2374 Merge pull request 'hardening 2.2: 2meet-data-optimizer-woocommerce-addon 0.2.0 (WooCommerce meta stays native)' (#3) from hardening/2.2 into main
Tests / PHP Lint (push) Successful in 9s
Tests / Integration Tests (push) Successful in 1m3s
Tests / Unit Tests (push) Failing after 10m9s
2026-09-27 10:56:58 +08:00
wpdev 655ab88e86 docs(2meet-data-optimizer-woocommerce-addon): 0.2.0 release notes
Tests / PHP Lint (pull_request) Successful in 11s
Tests / Unit Tests (pull_request) Successful in 1m30s
Tests / Integration Tests (pull_request) Successful in 1m27s
- Bump to 0.2.0; CHANGELOG entry for PR-085 with the upgrade path for the user hot table
- Verify: composer test, integration
- PR: PR-088
2026-09-27 09:55:38 +08:00
wpdev c3c4e1de44 refactor(2meet-data-optimizer-woocommerce-addon): drop the product/order hot fields and the user hot group
- 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
2026-09-27 09:48:33 +08:00
wpdev c76e474cbc Merge pull request 'release 0.1.1: 2meet-data-optimizer-woocommerce-addon' (#2) from release/0.1.1 into main
Tests / PHP Lint (push) Successful in 13s
Tests / Integration Tests (push) Failing after 1m29s
Tests / Unit Tests (push) Successful in 1m30s
2026-09-26 21:48:32 +08:00
wpdev c87eefcada chore(2meet-data-optimizer-woocommerce-addon): release 0.1.1
Tests / PHP Lint (pull_request) Successful in 9s
Tests / Unit Tests (pull_request) Successful in 53s
Tests / Integration Tests (pull_request) Successful in 49s
- 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)
2026-09-26 21:44:36 +08:00
wpdev 78fbd4f3c3 Merge pull request 'hardening 2.0: 2meet-data-optimizer-woocommerce-addon (staged rollout, dev22 first)' (#1) from hardening/2.0 into main
Tests / PHP Lint (push) Successful in 35s
Tests / Integration Tests (push) Successful in 41s
Tests / Unit Tests (push) Failing after 11m24s
2026-09-26 10:24:20 +08:00
wpdev 094248b75d fix(2meet-data-optimizer-woocommerce-addon): read real Marketplace commission keys
Tests / PHP Lint (pull_request) Successful in 11s
Tests / Integration Tests (pull_request) Successful in 59s
Tests / Unit Tests (pull_request) Successful in 59s
- 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
2026-09-25 22:47:35 +08:00
wpdev 421a8bc777 docs: CHANGELOG 記錄 3 個 WC runtime 欄位與 integration 測試套件
Tests / PHP Lint (push) Successful in 4s
Tests / Unit Tests (push) Successful in 16s
Tests / Integration Tests (push) Successful in 20s
2026-07-31 10:43:50 +08:00
wpdev 0118fc3a1a feat(fields): 補 3 個 WC runtime usermeta 欄位
Tests / Integration Tests (push) Successful in 1m7s
Tests / Unit Tests (push) Failing after 14m20s
Tests / PHP Lint (push) Failing after 14m28s
wc_last_active / wc_order_count_<prefix> / last_update 先前未註冊,會落回
wp_usermeta。三者皆由 WooCommerce 在 order/session 事件寫入,繁忙商店為高頻。

wc_order_count 走 Users::update_site_user_meta(),key 是
'wc_order_count' . '_' . rtrim( get_blog_prefix(), '_' );來源外掛寫死主站
形式 'wc_order_count_wp',multisite 子站(_wp_2)會漏接,這裡改用同一條運算式。
2026-07-31 10:18:33 +08:00
wpdev b9e24814c8 test: 加入 integration 測試套件(連真實 MariaDB)
Tests / PHP Lint (push) Successful in 4s
Tests / Unit Tests (push) Successful in 16s
Tests / Integration Tests (push) Successful in 18s
從 wp-data-optimizer v3.4.6 移植 1 個 integration 測試檔,並新增
tests/integration/bootstrap.php(複用核心的 integration bootstrap,不重複
 與 WP stub)+ phpunit-integration.xml + CI integration job。
2026-07-31 09:56:48 +08:00
wpdev abe738e900 test,ci: 建立 phpunit 基建 + 移植 WC 測試 + CI workflow
Tests / PHP Lint (push) Successful in 5s
Tests / Unit Tests (push) Successful in 17s
- composer.json / phpunit.xml / tests/bootstrap.php(比照 HP AddOn,
  直接 require 核心 plugin 的 unit bootstrap)
- tests/unit/WooCommerceIntegrationTest.php(自 A 移植,10 tests)
- .gitea/workflows/test.yml:lint + unit(unit job 會一併 checkout 核心 plugin,
  因為測試 bootstrap 依賴它)

10 tests / 33 assertions GREEN

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 09:20:07 +08:00
wpdev 2f9ed57390 chore(wc): 同步 A v3.4.6 的 WooCommerce 整合 + TablePrefix header(F4/F5)
4 個整合檔(woocommerce / wc-orders-interceptor / wc-term-count-filter /
admin-wc)對齊 A v3.4.6;主檔補 TablePrefix header。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 06:07:39 +08:00
wpdev 955689ddd2 feat(back-compat): 加入 WPDO_* class alias(E3)
核心的 class-tmdo-back-compat.php 在 plugins_loaded:4 執行,AddOn 於 :6
才載入,所以核心的 alias 表涵蓋不到 AddOn 類別 —— 姊妹外掛或第三方若
以 WPDO_* 名稱引用本 AddOn 的類別會直接 fatal。

新增 includes/back-compat-aliases.php,於 plugins_loaded:7 為本 AddOn
自有類別建立 WPDO_ alias;主檔加入 require。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 06:03:47 +08:00
wpdev 47288db826 chore: initial snapshot of 2meet-data-optimizer-woocommerce-addon v0.1.0
Baseline before backporting wp-data-optimizer v3.0.1-v3.4.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 05:06:36 +08:00