(priceId: string)
| 103 | * Matches against both monthly (`priceId`) and annual (`annualDiscountPriceId`) prices. |
| 104 | */ |
| 105 | export function getPlanByPriceId(priceId: string): BillingPlan | undefined { |
| 106 | if (!priceId) return undefined |
| 107 | return getPlans().find( |
| 108 | (plan) => plan.priceId === priceId || plan.annualDiscountPriceId === priceId |
| 109 | ) |
| 110 | } |
| 111 | |
| 112 | /** |
| 113 | * Get plan limits for a given plan name |
no test coverage detected