Skip to content

Commit 39338b9

Browse files
committed
Conditionally render credit notice based on the feature flag
1 parent 21478e1 commit 39338b9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/my-sites/plans-features-main/components/plan-notice-domain-to-plan-credit.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import config from '@automattic/calypso-config';
12
import { formatCurrency } from '@automattic/format-currency';
23
import { localizeUrl } from '@automattic/i18n-utils';
34
import { useTranslate } from 'i18n-calypso';
@@ -28,8 +29,10 @@ const PlanNoticeDomainToPlanCredit = ( {
2829
const upgradeCreditDocsUrl = localizeUrl(
2930
'https://wordpress.com/support/manage-purchases/upgrade-your-plan/#upgrade-credit'
3031
);
32+
const featureFlagEnabled = config.isEnabled( 'domain-to-plan-credit' );
3133

3234
const showNotice =
35+
featureFlagEnabled &&
3336
visiblePlans &&
3437
visiblePlans.length > 0 &&
3538
domainToPlanCreditsApplicable !== null &&

0 commit comments

Comments
 (0)