refactor(2meet-data-optimizer): retire the SSO AddOn recommendation

- missing_integration_addons() no longer asks for the SSO AddOn when
  2meet-hub-core / 2meet-spoke-sso are active: they register their own
  tables and the `sso` values belong in usermeta (benchmark: no
  measurable gain from the flat table for by-user-id access).
- `sso` joins the deprecated AddOns; for hub / spoke / sso the notice says
  they go without replacement and to run
  `wp tmdo bridge-restore-native user --group=sso --retire` first.
- Verify: core unit 658 / integration 479 green, phpcs clean
- PR: PR-043
This commit is contained in:
2026-09-26 04:07:40 +08:00
parent 44a188b7ee
commit ecf4ff4938
4 changed files with 13 additions and 24 deletions
@@ -6,8 +6,9 @@
* mobile-bridge, playlist, quotation, spoke) only registered tables and fields
* on the partner's behalf. Partner plugins now register themselves with the
* TMDO_Anti_EAV_Aware trait (docs/PARTNER-REGISTRATION.md), so these AddOns
* are deprecated and will be removed. The hub and spoke AddOns are replaced
* by 2meet-data-optimizer-sso-addon.
* are deprecated and will be removed. The SSO data needs no AddOn at all:
* the hub, spoke and SSO AddOns go without replacement (the `sso` group gave
* no measurable gain over usermeta) once its values are written back.
*
* @package WP_Data_Optimizer
*/
@@ -24,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
final class TMDO_Deprecated_Addons_Notice {
/** In-house plugins whose AddOn is replaced by partner self-registration. */
private const SLUGS = array( 'bookings', 'collab', 'hub', 'infocards', 'mobile-bridge', 'playlist', 'quotation', 'spoke' );
private const SLUGS = array( 'bookings', 'collab', 'hub', 'infocards', 'mobile-bridge', 'playlist', 'quotation', 'spoke', 'sso' );
/**
* Hook the notice.
@@ -80,10 +81,10 @@ final class TMDO_Deprecated_Addons_Notice {
),
esc_html__( '改寫方式見 2meet-data-optimizer 外掛內的 docs/PARTNER-REGISTRATION.md;partner 外掛完成自行註冊後即可停用對應 AddOn。', '2meet-data-optimizer' )
);
if ( array_intersect( $active, array( 'hub', 'spoke' ) ) ) {
if ( array_intersect( $active, array( 'hub', 'spoke', 'sso' ) ) ) {
printf(
'<div class="notice notice-warning"><p>%s</p></div>',
esc_html__( 'Hub / Spoke AddOn 由 2meet-data-optimizer-sso-addon 取代:啟用它之後即可停用這兩個 AddOn。', '2meet-data-optimizer' )
esc_html__( 'Hub / Spoke / SSO AddOn 不需替代:2meet-hub-core 與 2meet-spoke-sso 會自行註冊資料表,SSO 值存回 usermeta 即可。停用前先執行 wp tmdo bridge-restore-native user --group=sso --retire。', '2meet-data-optimizer' )
);
}
}