From 7041991967bca45a7184fcdf865f3bf6c4c677ae Mon Sep 17 00:00:00 2001 From: forehalo Date: Tue, 7 May 2024 07:44:40 +0000 Subject: [PATCH] fix(server): allow promotion codes if no discount applied (#6810) --- packages/backend/server/src/plugins/payment/service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/server/src/plugins/payment/service.ts b/packages/backend/server/src/plugins/payment/service.ts index 57fff9695cc4e..48b3d5e55e60b 100644 --- a/packages/backend/server/src/plugins/payment/service.ts +++ b/packages/backend/server/src/plugins/payment/service.ts @@ -204,7 +204,7 @@ export class SubscriptionService { tax_id_collection: { enabled: true, }, - discounts, + ...(discounts ? { discounts } : { allow_promotion_codes: true }), mode: 'subscription', success_url: redirectUrl, customer: customer.stripeCustomerId,