From a0001df1ad5088f81814bf47ec5a15300e3d781c Mon Sep 17 00:00:00 2001 From: Thibaut Patel Date: Thu, 10 Mar 2022 09:50:10 +0100 Subject: [PATCH] Added the product name property in member reads refs https://github.com/TryGhost/Team/issues/1141 - The goal is to retrieve the product name for canceled subscriptions - The property is located at `member.subscriptions.price.product.name` - We can't easily get the full product as products are retrieved using a join through `members_products`, and there is only a `members_products` row when the subscription is active --- ghost/members-api/lib/services/member-bread.js | 1 + 1 file changed, 1 insertion(+) diff --git a/ghost/members-api/lib/services/member-bread.js b/ghost/members-api/lib/services/member-bread.js index 623e7a04e6..f954b525dc 100644 --- a/ghost/members-api/lib/services/member-bread.js +++ b/ghost/members-api/lib/services/member-bread.js @@ -128,6 +128,7 @@ module.exports = class MemberBREADService { 'stripeSubscriptions.customer', 'stripeSubscriptions.stripePrice', 'stripeSubscriptions.stripePrice.stripeProduct', + 'stripeSubscriptions.stripePrice.stripeProduct.product', 'products', 'offerRedemptions' ];