5d13f70f16
Version bump for a re-release packaged alongside the WP-MVB v8 hub (dev39) acceptance; code is identical to the previous release.
118 lines
4.2 KiB
Markdown
118 lines
4.2 KiB
Markdown
# Changelog
|
||
|
||
All notable changes to this AddOn will be documented here.
|
||
|
||
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
||
Versioning follows [Semantic Versioning](https://semver.org/).
|
||
|
||
---
|
||
|
||
## [Unreleased]
|
||
|
||
---
|
||
|
||
## [0.3.1] — 2026-10-02 — 重新打包
|
||
|
||
### Changed
|
||
- 重新打包(無功能變更):與 WP-MVB v8 樞紐站(dev39)一同驗收後發版;程式碼與前一版相同。
|
||
|
||
---
|
||
|
||
## [0.3.0] — 2026-09-27
|
||
|
||
Released with 2meet-data-optimizer 1.3.0 (hardening 2.3).
|
||
|
||
### Fixed
|
||
|
||
- Commission amounts follow refunds. The commission upsert kept the amounts of
|
||
the first tracked event (it only updated `status` / `updated_at`), so a
|
||
partial refund before completion left the vendor payout overstated. It now
|
||
replaces `subtotal`, `commission`, `vendor_payout` and `commission_rate` too,
|
||
and `woocommerce_order_refunded` recomputes an order that is in a tracked
|
||
status or already has a row (a fully refunded order keeps its row at zero,
|
||
status `refunded`; untracked orders get none). Repeated events still leave
|
||
one row per order and vendor. dev36: partial refund then completion records
|
||
the refunded amount. (PR-092)
|
||
- Amounts follow Marketplace::get_order_profit() (what the vendor is paid,
|
||
which subtracts the full tax after refunds); the subtotal is floored at 0,
|
||
so a fully refunded taxed order no longer records a negative commission.
|
||
(PR-112)
|
||
|
||
### Upgrading
|
||
|
||
- Rows recorded before 0.3.0 are corrected on the order's next tracked status
|
||
change or refund; there is no bulk recompute.
|
||
|
||
---
|
||
|
||
## [0.2.0] — 2026-09-27
|
||
|
||
Released with 2meet-data-optimizer 1.2.0 (hardening 2.2, search-index mode
|
||
decision 2: WooCommerce meta stays native).
|
||
|
||
### Removed
|
||
|
||
- WooCommerce meta is no longer copied to flat tables. WooCommerce reads its
|
||
meta directly and writes stock / sales by SQL, so a flat copy drifted
|
||
(R-2.1: stock and `total_sales` out of step after an order). No longer
|
||
registered:
|
||
- product and order zone fields (`wpdo_register_fields`), including the
|
||
subscription fields;
|
||
- the `user` / `hot` entity group (`wpdo_register_entity_fields`),
|
||
including the three fields added in 0.1.1.
|
||
- Kept: the `wp_wc_*` custom table registry, the HPOS notice, the
|
||
Marketplace commission tracking and the term count filter.
|
||
|
||
### Upgrading
|
||
|
||
- Nothing is dropped. With the user entity below `aeav_only`, WooCommerce keeps
|
||
reading native user meta and the `wp_wpdo_user_hot` table is simply no
|
||
longer written. In `aeav_only`, core restores the group as an orphan so its
|
||
values stay readable; `wp tmdo bridge-restore-native user --group=hot --retire`
|
||
writes them back to native and archives the table.
|
||
- Product flat data (core's former `post/wc_product` group): see
|
||
2meet-data-optimizer 1.2.0.
|
||
|
||
---
|
||
|
||
## [0.1.1] — 2026-09-26
|
||
|
||
Hardening 2.0 changes, released alongside 2meet-data-optimizer 1.1.0.
|
||
|
||
### Fixed
|
||
|
||
- Commission tracking read `_hp_*` keys that Marketplace never writes, so no
|
||
commission was recorded. It now reads `hp_vendor` / `hp_commission_rate` /
|
||
`hp_commission_fee` and computes subtotal, vendor payout and commission the
|
||
way `Marketplace::get_order_profit()` does (honouring
|
||
`hp_vendor_include_taxes`); stores the vendor's user ID, the product's parent
|
||
listing and the platform commission percentage.
|
||
|
||
### Added
|
||
|
||
- 三個 WC runtime usermeta 欄位進 `user`/`hot` group:`wc_last_active`、
|
||
`wc_order_count_<blog-prefix>`、`last_update`。先前未註冊,這些高頻欄位
|
||
會落回 `wp_usermeta`。
|
||
- `tests/integration/`:bootstrap(複用核心的 integration bootstrap,連真實
|
||
MariaDB)+ `phpunit-integration.xml` + CI job,移植 `WCTermCountFilterTest`
|
||
(18 tests)。
|
||
|
||
### Notes
|
||
|
||
- `wc_order_count` 走 WooCommerce 的 `Users::update_site_user_meta()`,實際
|
||
key 是 `'wc_order_count' . '_' . rtrim( get_blog_prefix(), '_' )`。來源外掛
|
||
寫死主站形式 `wc_order_count_wp`,multisite 子站(`_wp_2`)會漏接;此處用
|
||
同一條運算式算出來。
|
||
|
||
- Phase 3 implementation in progress.
|
||
|
||
---
|
||
|
||
## [0.1.0] — TBD
|
||
|
||
### Added (initial release, scaffold)
|
||
|
||
- Plugin scaffold from `wp-data-optimizer v2.16.0` extraction plan.
|
||
- Plugin Header + bootstrap stub + 7 MD + composer.json.
|
||
- Requires Plugins: `2meet-data-optimizer`, `woocommerce`.
|