From bca45cea16896d40592483368a40a6f44acf5a3f Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 07:30:57 +0000 Subject: [PATCH] Parallelize Stripe price creation for product variants using Promise.all Co-authored-by: AJFrio <20246916+AJFrio@users.noreply.github.com> --- src/services/ProductStripeService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/ProductStripeService.js b/src/services/ProductStripeService.js index 1ac6e7b..07aacd6 100644 --- a/src/services/ProductStripeService.js +++ b/src/services/ProductStripeService.js @@ -91,7 +91,7 @@ export class ProductStripeService { } // Create Stripe prices for each combination - for (const combo of combinations) { + await Promise.all(combinations.map(async (combo) => { const stripePrice = await this.stripe.createPrice({ amount: combo.price, currency: productData.currency, @@ -118,7 +118,7 @@ export class ProductStripeService { } else if (combo.variant2) { variantPrices[combo.variant2.id] = stripePrice.id } - } + })) // Also create base price for fallback basePrice = await this.stripe.createPrice({