From 32933ed6ef553565100e82631511ae79d0f40f54 Mon Sep 17 00:00:00 2001 From: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Date: Tue, 28 Nov 2023 12:55:35 +0000 Subject: [PATCH] fix: premium username to premium username (#12569) --- .../server/routers/loggedInViewer/updateProfile.handler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/trpc/server/routers/loggedInViewer/updateProfile.handler.ts b/packages/trpc/server/routers/loggedInViewer/updateProfile.handler.ts index 60855221eb..49041244a6 100644 --- a/packages/trpc/server/routers/loggedInViewer/updateProfile.handler.ts +++ b/packages/trpc/server/routers/loggedInViewer/updateProfile.handler.ts @@ -3,7 +3,7 @@ import type { GetServerSidePropsContext, NextApiResponse } from "next"; import { v4 as uuidv4 } from "uuid"; import stripe from "@calcom/app-store/stripepayment/lib/server"; -import { getPremiumPlanProductId } from "@calcom/app-store/stripepayment/lib/utils"; +import { getPremiumMonthlyPlanPriceId } from "@calcom/app-store/stripepayment/lib/utils"; import { passwordResetRequest } from "@calcom/features/auth/lib/passwordResetRequest"; import hasKeyInMetadata from "@calcom/lib/hasKeyInMetadata"; import logger from "@calcom/lib/logger"; @@ -110,7 +110,7 @@ export const updateProfileHandler = async ({ ctx, input }: UpdateProfileOptions) // @TODO: iterate if stripeSubscriptions.hasMore is true const isPremiumUsernameSubscriptionActive = stripeSubscriptions.data.some( (subscription) => - subscription.items.data[0].price.product === getPremiumPlanProductId() && + subscription.items.data[0].price.id === getPremiumMonthlyPlanPriceId() && subscription.status === "active" );