Skip to content

Commit

Permalink
enable term-savings via experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskmnds committed Nov 20, 2024
1 parent 769ceac commit 13da6bf
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions client/my-sites/plans-features-main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ import ComparisonGridToggle from './components/comparison-grid-toggle';
import PlanUpsellModal from './components/plan-upsell-modal';
import { useModalResolutionCallback } from './components/plan-upsell-modal/hooks/use-modal-resolution-callback';
import PlansPageSubheader from './components/plans-page-subheader';
import useLongerPlanTermDefaultExperiment from './hooks/experiments/use-longer-plan-term-default-experiment';
import useCheckPlanAvailabilityForPurchase from './hooks/use-check-plan-availability-for-purchase';
import useDefaultWpcomPlansIntent from './hooks/use-default-wpcom-plans-intent';
import useFilteredDisplayedIntervals from './hooks/use-filtered-displayed-intervals';
Expand Down Expand Up @@ -242,6 +243,8 @@ const PlansFeaturesMain = ( {
const showUpgradeableStorage = config.isEnabled( 'plans/upgradeable-storage' );
const getPlanTypeDestination = usePlanTypeDestinationCallback();

const longerPlanTermDefaultExperiment = useLongerPlanTermDefaultExperiment();

const resolveModal = useModalResolutionCallback( {
isCustomDomainAllowedOnFreePlan,
flowName,
Expand Down Expand Up @@ -636,7 +639,8 @@ const PlansFeaturesMain = ( {
! intent ||
! defaultWpcomPlansIntent || // this may be unnecessary, but just in case
! gridPlansForFeaturesGrid ||
! gridPlansForComparisonGrid
! gridPlansForComparisonGrid ||
longerPlanTermDefaultExperiment.isLoadingExperiment
);

const isPlansGridReady = ! isLoadingGridPlans && ! resolvedSubdomainName.isLoading;
Expand Down Expand Up @@ -842,9 +846,10 @@ const PlansFeaturesMain = ( {
enableReducedFeatureGroupSpacing={ showSimplifiedFeatures }
enableLogosOnlyForEnterprisePlan={ showSimplifiedFeatures }
hideFeatureGroupTitles={ showSimplifiedFeatures }
enableTermSavingsPriceDisplay={ isEnabled(
'plans/term-savings-price-display'
) }
enableTermSavingsPriceDisplay={
isEnabled( 'plans/term-savings-price-display' ) ||
longerPlanTermDefaultExperiment.isEligibleForTermSavings
}
/>
) }
{ showEscapeHatch && hidePlansFeatureComparison && viewAllPlansButton }
Expand Down Expand Up @@ -904,9 +909,10 @@ const PlansFeaturesMain = ( {
}
enableFeatureTooltips
featureGroupMap={ featureGroupMapForComparisonGrid }
enableTermSavingsPriceDisplay={ isEnabled(
'plans/term-savings-price-display'
) }
enableTermSavingsPriceDisplay={
isEnabled( 'plans/term-savings-price-display' ) ||
longerPlanTermDefaultExperiment.isEligibleForTermSavings
}
/>
) }
<ComparisonGridToggle
Expand Down

0 comments on commit 13da6bf

Please sign in to comment.