From 03abd4148ece5aa60f3b6d96610c4cd5c0aec7dd Mon Sep 17 00:00:00 2001 From: Omar Alshaker Date: Thu, 20 Jun 2024 21:33:13 +0200 Subject: [PATCH] Add isBusinessOrEcomPlanUser in Calypso only --- .../editing-toolkit-plugin/help-center/src/admin-bar.js | 1 - .../editing-toolkit-plugin/help-center/src/help-center.js | 1 - .../help-center/src/components/help-center-more-resources.tsx | 1 - packages/help-center/src/contexts/HelpCenterContext.tsx | 4 ++-- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/editing-toolkit/editing-toolkit-plugin/help-center/src/admin-bar.js b/apps/editing-toolkit/editing-toolkit-plugin/help-center/src/admin-bar.js index 9cf2a22efc6f9..6e9e9aef40b17 100644 --- a/apps/editing-toolkit/editing-toolkit-plugin/help-center/src/admin-bar.js +++ b/apps/editing-toolkit/editing-toolkit-plugin/help-center/src/admin-bar.js @@ -40,7 +40,6 @@ function AdminHelpCenterContent() { locale={ window.helpCenterData.locale } sectionName="wp-admin" currentUserId={ window.helpCenterData.current_user_id } - isBusinessOrEcomPlanUser={ window.helpCenterData.is_business_or_ecommerce_plan_user } selectedSiteId={ window.helpCenterData.current } hasPurchases={ false } primarySiteId={ window.helpCenterData.primary_site_id } diff --git a/apps/editing-toolkit/editing-toolkit-plugin/help-center/src/help-center.js b/apps/editing-toolkit/editing-toolkit-plugin/help-center/src/help-center.js index 9eebc7fdd50c2..0a954e8c9b11d 100644 --- a/apps/editing-toolkit/editing-toolkit-plugin/help-center/src/help-center.js +++ b/apps/editing-toolkit/editing-toolkit-plugin/help-center/src/help-center.js @@ -68,7 +68,6 @@ function HelpCenterContent() { locale={ window.helpCenterData.locale } sectionName="gutenberg-editor" currentUserId={ window.helpCenterData.current_user_id } - isBusinessOrEcomPlanUser={ window.helpCenterData.is_business_or_ecommerce_plan_user } selectedSiteId={ window.helpCenterData.current } hasPurchases={ false } primarySiteId={ window.helpCenterData.primary_site_id } diff --git a/packages/help-center/src/components/help-center-more-resources.tsx b/packages/help-center/src/components/help-center-more-resources.tsx index 622d036c63cdb..390a637f5a5b1 100644 --- a/packages/help-center/src/components/help-center-more-resources.tsx +++ b/packages/help-center/src/components/help-center-more-resources.tsx @@ -52,7 +52,6 @@ export const HelpCenterMoreResources = () => { const trackMoreResourcesButtonClick = ( resource: string ) => { recordTracksEvent( 'calypso_help_moreresources_click', { - is_business_or_ecommerce_plan_user: isBusinessOrEcomPlanUser, resource: resource, force_site_id: true, location: 'help-center', diff --git a/packages/help-center/src/contexts/HelpCenterContext.tsx b/packages/help-center/src/contexts/HelpCenterContext.tsx index 19a0a2db3012c..141ad1becc76b 100644 --- a/packages/help-center/src/contexts/HelpCenterContext.tsx +++ b/packages/help-center/src/contexts/HelpCenterContext.tsx @@ -9,10 +9,10 @@ export type HelpCenterRequiredInformation = { hasPurchases: boolean; primarySiteId: number; getGoogleMailServiceFamily: string; + isBusinessOrEcomPlanUser?: boolean; onboardingUrl: string; isJetpackSite: boolean; adminUrl: string; - isBusinessOrEcomPlanUser: boolean; }; const HelpCenterRequiredContext = React.createContext< HelpCenterRequiredInformation >( { @@ -22,11 +22,11 @@ const HelpCenterRequiredContext = React.createContext< HelpCenterRequiredInforma selectedSiteId: 0, hasPurchases: false, primarySiteId: 0, + isBusinessOrEcomPlanUser: false, getGoogleMailServiceFamily: '', onboardingUrl: '', isJetpackSite: false, adminUrl: '', - isBusinessOrEcomPlanUser: false, } ); export const HelpCenterRequiredContextProvider: React.FC< {