diff --git a/projects/packages/my-jetpack/_inc/components/connection-status-card/index.jsx b/projects/packages/my-jetpack/_inc/components/connection-status-card/index.jsx index ba55b4f5bda61..b9a0bec134f5f 100644 --- a/projects/packages/my-jetpack/_inc/components/connection-status-card/index.jsx +++ b/projects/packages/my-jetpack/_inc/components/connection-status-card/index.jsx @@ -99,6 +99,14 @@ const ConnectionStatusCard = props => { [ onDisconnected, setConnectionStatus ] ); + /** + * Compare the two values and set IsMultidomain to true if they are the same + */ + const isMultidomain = + window.myJetpackInitialState.siteSuffix !== window.myJetpackInitialState.wpcomURLSuffix; + + const isIDC = window.hasOwnProperty( 'JP_IDENTITY_CRISIS__INITIAL_STATE' ) ?? false; + return (

{ title }

@@ -119,7 +127,7 @@ const ConnectionStatusCard = props => {
@@ -142,16 +150,44 @@ const ConnectionStatusCard = props => { /> ) : ( <> - - { isUserConnected && ( + { isIDC && ( + + ) } + { isMultidomain && ! isIDC && ( +
+ + +
+ ) } + { ! isMultidomain && ! isIDC && ( + + ) } + { isUserConnected && ! isIDC && ( { ) } { isUserConnected && userConnectionData?.connectionOwner && - ! userConnectionData.currentUser?.isMaster && ( + ! userConnectionData.currentUser?.isMaster && + ! isIDC && ( Jetpack_Manage::could_use_jp_manage(), 'isAgencyAccount' => Jetpack_Manage::is_agency_account(), ), + 'wpcomURL' => self::get_site()->data->URL, + 'wpcomURLSuffix' => ( new Status() )->get_site_suffix( self::get_site()->data->URL ), ) );