File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/ui/src/components/SubscriptionDetails Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @clerk/ui ' : patch
3+ ---
4+
5+ Fix issue where default plans offered the ability to switch to annual.
Original file line number Diff line number Diff line change @@ -375,8 +375,9 @@ const SubscriptionCardActions = ({ subscription }: { subscription: BillingSubscr
375375
376376 const isSwitchable =
377377 ( ( subscription . planPeriod === 'month' && Boolean ( subscription . plan . annualMonthlyFee ) ) ||
378- subscription . planPeriod === 'annual' ) &&
379- subscription . status !== 'past_due' ;
378+ ( subscription . planPeriod === 'annual' && Boolean ( subscription . plan . fee ) ) ) &&
379+ subscription . status !== 'past_due' &&
380+ ! subscription . plan . isDefault ;
380381 const isFree = isFreePlan ( subscription . plan ) ;
381382 const isCancellable = subscription . canceledAt === null && ! isFree ;
382383 const isReSubscribable = subscription . canceledAt !== null && ! isFree ;
You can’t perform that action at this time.
0 commit comments