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.
This commit is contained in:
parent
aa640ada5e
commit
1dd2c4f656
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user