0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-04-15 03:01:37 -05:00

Updated parsing subscriptions for member

no refs

The data structure for subscriptions object on member has changed in 4.x from` stripe.subscriptions` to direct `subscriptions`, the change here updates parsing of subscriptions data
This commit is contained in:
Rish 2021-01-28 22:39:19 +05:30 committed by Fabien O'Carroll
parent f504b98e02
commit 94301e3c17

View file

@ -35,7 +35,7 @@ const unparse = (members) => {
note: member.note,
subscribed_to_emails: member.subscribed,
complimentary_plan: member.comped || member.complimentary_plan,
stripe_customer_id: _.get(member, 'stripe.subscriptions[0].customer.id') || member.stripe_customer_id,
stripe_customer_id: _.get(member, 'subscriptions[0].customer.id') || member.stripe_customer_id,
created_at: member.created_at,
deleted_at: member.deleted_at,
labels: labels,