diff --git a/admin/class-tmdo-deprecated-addons-notice.php b/admin/class-tmdo-deprecated-addons-notice.php
index ecc665a..89c0151 100644
--- a/admin/class-tmdo-deprecated-addons-notice.php
+++ b/admin/class-tmdo-deprecated-addons-notice.php
@@ -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(
'
',
- 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' )
);
}
}
diff --git a/includes/class-tmdo-compatibility.php b/includes/class-tmdo-compatibility.php
index cda622f..c8891eb 100644
--- a/includes/class-tmdo-compatibility.php
+++ b/includes/class-tmdo-compatibility.php
@@ -85,10 +85,6 @@ class TMDO_Compatibility {
if ( self::is_woocommerce_active() && ! class_exists( 'TMDO_Woocommerce_Bootstrap' ) ) {
$missing['WooCommerce'] = '2meet-data-optimizer-woocommerce-addon';
}
- // 2meet-hub-core / 2meet-spoke-sso read and write the user `sso` group it owns.
- if ( ( class_exists( 'TMHC_Plugin', false ) || class_exists( 'TMSO_Plugin', false ) ) && ! class_exists( 'TMDO_SSO_Integration', false ) ) {
- $missing['2meet Hub / Spoke SSO'] = '2meet-data-optimizer-sso-addon';
- }
return $missing;
}
diff --git a/tests/unit/DeprecatedAddonsNoticeTest.php b/tests/unit/DeprecatedAddonsNoticeTest.php
index c858e90..27801b9 100644
--- a/tests/unit/DeprecatedAddonsNoticeTest.php
+++ b/tests/unit/DeprecatedAddonsNoticeTest.php
@@ -43,15 +43,17 @@ class DeprecatedAddonsNoticeTest extends TestCase {
$this->assertStringContainsString( 'PARTNER-REGISTRATION.md', $html );
}
- public function test_hub_and_spoke_point_to_the_sso_addon(): void {
- $GLOBALS['_wp_options']['active_plugins'] = array( '2meet-data-optimizer-spoke-addon/2meet-data-optimizer-spoke-addon.php' );
+ public function test_sso_hub_and_spoke_addons_are_deprecated_without_replacement(): void {
+ $this->activate( 'hub', 'sso' );
+ $this->assertSame( array( 'hub', 'sso' ), TMDO_Deprecated_Addons_Notice::active() );
ob_start();
TMDO_Deprecated_Addons_Notice::render();
$html = (string) ob_get_clean();
- $this->assertStringContainsString( '2meet-data-optimizer-spoke-addon', $html );
$this->assertStringContainsString( '2meet-data-optimizer-sso-addon', $html );
+ $this->assertStringContainsString( '不需替代', $html );
+ $this->assertStringContainsString( 'bridge-restore-native user --group=sso --retire', $html );
}
public function test_no_notice_when_none_active_or_user_cannot_manage(): void {
diff --git a/tests/unit/MissingIntegrationAddonsTest.php b/tests/unit/MissingIntegrationAddonsTest.php
index ae93ead..12e8b8c 100644
--- a/tests/unit/MissingIntegrationAddonsTest.php
+++ b/tests/unit/MissingIntegrationAddonsTest.php
@@ -83,19 +83,9 @@ class MissingIntegrationAddonsTest extends TestCase {
* @runInSeparateProcess
* @preserveGlobalState disabled
*/
- public function test_hub_or_spoke_without_the_sso_addon_is_reported(): void {
- eval( 'final class TMSO_Plugin {}' );
-
- $this->assertSame( array( '2meet Hub / Spoke SSO' => '2meet-data-optimizer-sso-addon' ), TMDO_Compatibility::missing_integration_addons() );
- }
-
- /**
- * @runInSeparateProcess
- * @preserveGlobalState disabled
- */
- public function test_hub_with_the_sso_addon_is_fine(): void {
+ public function test_hub_and_spoke_need_no_addon(): void {
eval( 'final class TMHC_Plugin {}' );
- eval( 'final class TMDO_SSO_Integration {}' );
+ eval( 'final class TMSO_Plugin {}' );
$this->assertSame( array(), TMDO_Compatibility::missing_integration_addons() );
}