From 527c471d4c704a6669e1d3ee00b7c901437c3781 Mon Sep 17 00:00:00 2001 From: Jasper Kang Date: Wed, 11 Dec 2024 12:29:22 +1300 Subject: [PATCH] fix support links --- client/my-sites/stats/const.js | 3 +++ .../stats/stats-upsell/insights-upsell.tsx | 14 +++++++++++++- .../my-sites/stats/stats-upsell/traffic-upsell.tsx | 14 +++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/client/my-sites/stats/const.js b/client/my-sites/stats/const.js index f5b0ed7f7ac3e8..46a43e5dbd5fc4 100644 --- a/client/my-sites/stats/const.js +++ b/client/my-sites/stats/const.js @@ -27,3 +27,6 @@ export const JETPACK_SUPPORT_VIDEOPRESS_URL = 'https://jetpack.com/support/jetpa export const JETPACK_SUPPORT_VIDEOPRESS_URL_STATS = 'https://jetpack.com/support/jetpack-videopress/add-video-block-editor/video-stats/'; export const JETPACK_VIDEOPRESS_LANDING_PAGE_URL = 'https://jetpack.com/videopress/'; +export const WPCOM_PERSONAL_PLAN_SUPPORT = + // eslint-disable-next-line wpcalypso/i18n-unlocalized-url + 'https://wordpress.com/support/plan-features/personal-plan/'; diff --git a/client/my-sites/stats/stats-upsell/insights-upsell.tsx b/client/my-sites/stats/stats-upsell/insights-upsell.tsx index d5a1182936d4f6..02c17952149ed4 100644 --- a/client/my-sites/stats/stats-upsell/insights-upsell.tsx +++ b/client/my-sites/stats/stats-upsell/insights-upsell.tsx @@ -1,11 +1,16 @@ +import { isEnabled } from '@automattic/calypso-config'; +import { localizeUrl } from '@automattic/i18n-utils'; +import { Button } from '@wordpress/components'; import { useTranslate } from 'i18n-calypso'; import statsFeaturesPNG from 'calypso/assets/images/stats/paid-features-2.png'; import InlineSupportLink from 'calypso/components/inline-support-link'; +import { WPCOM_PERSONAL_PLAN_SUPPORT } from '../const'; import { STATS_FEATURE_PAGE_INSIGHTS } from '../constants'; import StatsUpsell from './index'; const InsightsUpsell: React.FC = () => { const translate = useTranslate(); + const isOdysseyStats = isEnabled( 'is_odyssey' ); return ( { features={ [ translate( '{{personalFeaturesLink}}All personal plan features{{/personalFeaturesLink}}', { components: { - personalFeaturesLink: ( + personalFeaturesLink: ! isOdysseyStats ? ( + ) : ( +