File tree Expand file tree Collapse file tree
BuyProcess/NewPlanSelection
MyPlan/SubscriptionDetails/EmailMarketingPlan Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,15 @@ const getFormattedPriceOptions = (value) => ({
2424const MORE_THAN_100K_OPTION_VALUE = 'more-than-100000' ;
2525
2626const getSessionPromocodeApplied = ( sessionPlan ) => {
27+ const isFreeAccount = Boolean ( sessionPlan ?. plan ?. isFreeAccount ) ;
28+ const planSubscription = Number ( sessionPlan ?. plan ?. planSubscription ) ;
29+ const hasNonMonthlySubscription = ! Number . isNaN ( planSubscription ) && planSubscription !== 1 ;
30+
31+ // For paid users with non-monthly subscription we should not prepopulate promocode.
32+ if ( ! isFreeAccount && hasNonMonthlySubscription ) {
33+ return null ;
34+ }
35+
2736 const promotion = sessionPlan ?. plan ?. promotion ;
2837 const sanitizeCode = ( value ) =>
2938 value === undefined || value === null ? '' : String ( value ) . trim ( ) ;
@@ -227,7 +236,7 @@ export const ContactsPlan = InjectAppServices(
227236 const shouldShowLosePromotionWarning =
228237 ! isTailoredPlan && isUpgradePlan && isAppliedPromocodeSameAsSaved ;
229238 const shouldUseAdvisorCta = isTailoredPlan || shouldShowDowngradeWarning ;
230- const shouldDisablePaymentFrequency = ! keepControlsEnabled ;
239+ const shouldDisablePaymentFrequency = ! isFreeAccount && ! keepControlsEnabled ;
231240
232241 const stickyDiscountSummary = useMemo ( ( ) => {
233242 if ( isTailoredPlan ) {
You can’t perform that action at this time.
0 commit comments