diff --git a/apps/admin-x-settings/src/components/settings/membership/portal/SignupOptions.tsx b/apps/admin-x-settings/src/components/settings/membership/portal/SignupOptions.tsx index eb2e4faa37..f56499ca7e 100644 --- a/apps/admin-x-settings/src/components/settings/membership/portal/SignupOptions.tsx +++ b/apps/admin-x-settings/src/components/settings/membership/portal/SignupOptions.tsx @@ -99,15 +99,15 @@ const SignupOptions: React.FC<{ }); } - const paidActiveTiersResult = getPaidActiveTiers(localTiers) || []; + const paidActiveTiers = getPaidActiveTiers(localTiers) || []; const defaultPlanOptions: SelectOption[] = [ {value: 'yearly', label: 'Yearly'}, {value: 'monthly', label: 'Monthly'} ]; - if (paidActiveTiersResult.length > 0 && isStripeEnabled) { - paidActiveTiersResult.forEach((tier) => { + if (isStripeEnabled && paidActiveTiers.length > 0) { + paidActiveTiers.forEach((tier) => { tiersCheckboxes.push({ checked: (tier.visibility === 'public'), label: tier.name, @@ -117,6 +117,8 @@ const SignupOptions: React.FC<{ }); } + const arePaidTiersVisible = isStripeEnabled && paidActiveTiers.length > 0 && paidActiveTiers.some(tier => tier.visibility === 'public'); + return