Skip to content

Commit 100d0eb

Browse files
committed
Align with proper item name and item name
1 parent 3899450 commit 100d0eb

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/platform/cloud/subscription/composables/useSubscription.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ function useSubscriptionInternal() {
159159

160160
const { tierKey, billingCycle } = pendingPurchase
161161
const isYearly = billingCycle === 'yearly'
162-
const baseName = t(`subscription.tiers.${tierKey}.name`)
163-
const planName = isYearly
164-
? t('subscription.tierNameYearly', { name: baseName })
165-
: baseName
162+
const itemId = `${billingCycle}_${tierKey}`
163+
const itemName = `${billingCycle === 'yearly' ? 'Yearly' : 'Monthly'} ${
164+
tierKey.charAt(0).toUpperCase() + tierKey.slice(1)
165+
}`
166166
const unitPrice = getTierPrice(tierKey, isYearly)
167167
const value = isYearly && tierKey !== 'founder' ? unitPrice * 12 : unitPrice
168168
const metadata: SubscriptionPurchaseMetadata = {
@@ -171,8 +171,8 @@ function useSubscriptionInternal() {
171171
currency: 'USD',
172172
items: [
173173
{
174-
item_id: `${billingCycle}_${tierKey}`,
175-
item_name: planName,
174+
item_id: itemId,
175+
item_name: itemName,
176176
item_category: 'subscription',
177177
item_variant: billingCycle,
178178
price: value,

0 commit comments

Comments
 (0)