From 1dd2c4f656ec399299fdaf6f9e3fb73b8c64ef2f Mon Sep 17 00:00:00 2001 From: Rishabh Date: Thu, 6 May 2021 15:27:01 +0530 Subject: [PATCH] Added prices object to logged in member's identity data refs https://github.com/TryGhost/Team/issues/637 As we move away from `plan` data to `prices`, this change updates member identity data to include `prices` object in subscriptions object to get the price data for subscription instead of relying on `plan` data. --- ghost/members-api/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/members-api/index.js b/ghost/members-api/index.js index 766951b81a..e37ceb6825 100644 --- a/ghost/members-api/index.js +++ b/ghost/members-api/index.js @@ -261,7 +261,7 @@ module.exports = function MembersApi({ } async function getMemberIdentityData(email) { - const model = await users.get({email}, {withRelated: ['stripeSubscriptions', 'stripeSubscriptions.customer']}); + const model = await users.get({email}, {withRelated: ['stripeSubscriptions', 'stripeSubscriptions.customer', 'stripeSubscriptions.stripePrice', 'stripeSubscriptions.stripePrice.stripeProduct', 'stripeSubscriptions.stripePrice.stripeProduct.product']}); if (!model) { return null; }