From ebf8d8fe0c1a88b0ee49523e5461fbee6e6226f9 Mon Sep 17 00:00:00 2001 From: Dylan Staley <88163+dstaley@users.noreply.github.com> Date: Wed, 18 Mar 2026 17:11:26 -0500 Subject: [PATCH] fix(clerk-js): Don't render switch button on default plans --- .changeset/some-birds-know.md | 5 +++++ .../ui/components/PricingTable/utils/pricing-footer-state.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/some-birds-know.md diff --git a/.changeset/some-birds-know.md b/.changeset/some-birds-know.md new file mode 100644 index 00000000000..a523ff78109 --- /dev/null +++ b/.changeset/some-birds-know.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Fix issue where "Manage Subscription" button appeared on default free plans. diff --git a/packages/clerk-js/src/ui/components/PricingTable/utils/pricing-footer-state.ts b/packages/clerk-js/src/ui/components/PricingTable/utils/pricing-footer-state.ts index 634d24a9189..ca4711e2506 100644 --- a/packages/clerk-js/src/ui/components/PricingTable/utils/pricing-footer-state.ts +++ b/packages/clerk-js/src/ui/components/PricingTable/utils/pricing-footer-state.ts @@ -38,7 +38,10 @@ const valueResolution = (params: UsePricingFooterStateParams): [boolean, boolean // Active subscription if (subscription.status === 'active') { const isCanceled = !!subscription.canceledAt; - const isSwitchingPaidPeriod = planPeriod !== subscription.planPeriod && Boolean(plan.annualMonthlyFee); + const isSwitchingPaidPeriod = + !subscription.plan.isDefault && + planPeriod !== subscription.planPeriod && + ((planPeriod === 'annual' && Boolean(plan.annualMonthlyFee)) || (planPeriod === 'month' && Boolean(plan.fee))); const isActiveFreeTrial = plan.freeTrialEnabled && subscription.isFreeTrial; if (isCanceled || isSwitchingPaidPeriod) {