From afa5363dd4caf62a4cc9f055151810e7f56c6353 Mon Sep 17 00:00:00 2001 From: Fabien O'Carroll Date: Fri, 8 Oct 2021 15:19:09 +0200 Subject: [PATCH] Fixed Stripe Checkout for monthly Offers refs https://github.com/TryGhost/Members/commit/504fb1bf Since we updated the Offer to use Value Objects, we needed to update the usage here too. --- ghost/members-api/lib/controllers/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/members-api/lib/controllers/router.js b/ghost/members-api/lib/controllers/router.js index f6a4833072..eab5a80adc 100644 --- a/ghost/members-api/lib/controllers/router.js +++ b/ghost/members-api/lib/controllers/router.js @@ -140,7 +140,7 @@ module.exports = class RouterController { const offer = await this._offerRepository.getById(offerId); const tier = (await this._productRepository.get(offer.tier)).toJSON(); - if (offer.cadence === 'month') { + if (offer.cadence.value === 'month') { ghostPriceId = tier.monthly_price_id; } else { ghostPriceId = tier.yearly_price_id;