Commit 38cd896
authored
fix(pricing): update LemonSqueezy variant selection logic (#432)
* fix(pricing): update LemonSqueezy variant selection logic
Conditionally set lemonVariantId based on NEXT_PUBLIC_AUTHORIZED_TRIAL_AMOUNT to ensure the correct variant (with or without setup fee) is used for trials.
* fix(pricing): improve LemonSqueezy variant fallback logic
Update pricing configuration to robustly handle LemonSqueezy variant selection.
When 'NEXT_PUBLIC_AUTHORIZED_TRIAL_AMOUNT' is enabled, the code now checks if the specific setup-fee variant ID exists. If it is missing, it gracefully falls back to the standard variant ID, preventing potential runtime errors.1 parent b930ca7 commit 38cd896
1 file changed
+12
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
| |||
111 | 113 | | |
112 | 114 | | |
113 | 115 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
118 | 122 | | |
119 | 123 | | |
120 | 124 | | |
| |||
0 commit comments