mirror of
https://github.com/documenso/documenso.git
synced 2025-11-18 02:32:00 +10:00
fix(webapp): use checkout for expired plans
This commit is contained in:
@ -23,7 +23,7 @@ export const createCheckout = async ({ priceId }: CreateCheckoutOptions) => {
|
|||||||
let stripeCustomer: Stripe.Customer | null = null;
|
let stripeCustomer: Stripe.Customer | null = null;
|
||||||
|
|
||||||
// Find the Stripe customer for the current user subscription.
|
// Find the Stripe customer for the current user subscription.
|
||||||
if (existingSubscription) {
|
if (existingSubscription?.periodEnd && existingSubscription.periodEnd >= new Date()) {
|
||||||
stripeCustomer = await getStripeCustomerById(existingSubscription.customerId);
|
stripeCustomer = await getStripeCustomerById(existingSubscription.customerId);
|
||||||
|
|
||||||
if (!stripeCustomer) {
|
if (!stripeCustomer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user