File tree Expand file tree Collapse file tree
packages/components/src/components/modals Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -316,7 +316,9 @@ export function PricingModal(props: PricingModalProps) {
316316 < SubHeader
317317 title = {
318318 userPlanDetails && userPlanDetails . amount
319- ? 'CHANGE PLAN'
319+ ? userPlanDetails . id === selectedPlanId
320+ ? 'CHANGE CREDIT CARD'
321+ : 'CHANGE PLAN'
320322 : 'SELECT A PLAN'
321323 }
322324 />
@@ -347,9 +349,7 @@ export function PricingModal(props: PricingModalProps) {
347349 analyticsCategory = "subscribe"
348350 analyticsAction = "subscribe"
349351 analyticsLabel = "subscribe"
350- disabled = {
351- ! selectedPlan || selectedPlan . id === ( userPlan && userPlan . id )
352- }
352+ disabled = { ! selectedPlan }
353353 onPress = { ( ) => {
354354 if ( ! ( selectedPlan && selectedPlan . id ) ) return
355355
@@ -372,7 +372,7 @@ export function PricingModal(props: PricingModalProps) {
372372 { selectedPlan
373373 ? selectedPlan . amount > 0
374374 ? userPlan && userPlan . id === selectedPlan . id
375- ? 'You are on this plan '
375+ ? 'Change credit card '
376376 : 'Continue'
377377 : userPlan && userPlan . amount > 0
378378 ? 'Downgrade to free plan'
Original file line number Diff line number Diff line change @@ -75,12 +75,14 @@ export function SubscribeModal(props: SubscribeModalProps) {
7575 : 'Cancel subscription'
7676 : plan . amount < userPlan . amount
7777 ? 'Downgrade plan'
78+ : userPlan . id === plan . id
79+ ? 'Change credit card'
7880 : 'Change plan'
7981 : 'Subscribe'
8082 }
8183 >
8284 < >
83- { ! ! ( plan && plan . amount ) && (
85+ { ! ! ( plan && plan . amount && ! ( userPlan && userPlan . id === plan . id ) ) && (
8486 < >
8587 < SubHeader title = "Review your choice" />
8688
Original file line number Diff line number Diff line change @@ -480,13 +480,17 @@ const SubscribeFormWithStripe = React.memo(
480480 >
481481 { plan
482482 ? plan . amount > 0
483- ? `${
484- userPlan && userPlan . amount && userPlan . amount < plan . amount
485- ? 'Upgrade to'
486- : userPlan && userPlan . amount > plan . amount
487- ? 'Downgrade to'
488- : 'Unlock for'
489- } ${ formatPriceAndInterval ( plan . amount , plan ) } `
483+ ? userPlan && userPlan . id === plan . id
484+ ? 'Change credit card'
485+ : `${
486+ userPlan &&
487+ userPlan . amount &&
488+ userPlan . amount < plan . amount
489+ ? 'Upgrade to'
490+ : userPlan && userPlan . amount > plan . amount
491+ ? 'Downgrade to'
492+ : 'Unlock for'
493+ } ${ formatPriceAndInterval ( plan . amount , plan ) } `
490494 : userPlan && userPlan . amount > 0
491495 ? 'Confirm downgrade to free plan'
492496 : 'Subscribe'
You can’t perform that action at this time.
0 commit comments