diff --git a/ghost/admin/app/components/gh-member-settings-form.hbs b/ghost/admin/app/components/gh-member-settings-form.hbs index 6767d78ac5..7f24c94c52 100644 --- a/ghost/admin/app/components/gh-member-settings-form.hbs +++ b/ghost/admin/app/components/gh-member-settings-form.hbs @@ -216,6 +216,7 @@ {{/each}} {{else}} +
@@ -223,16 +224,16 @@ Stripe customer ID - - {{subscription.customer.id}} + + {{customer.id}} Name - {{#if subscription.customer.name}} - {{subscription.customer.name}} + {{#if customer.name}} + {{customer.name}} {{else}} No name {{/if}} @@ -241,8 +242,8 @@ Email - {{#if subscription.customer.email}} - {{subscription.customer.email}} + {{#if customer.email}} + {{customer.email}} {{else}} No email {{/if}} @@ -251,8 +252,8 @@ Customer since - {{#if subscription.startDate}} - {{subscription.startDate}} + {{#if customer.startDate}} + {{customer.startDate}} {{else}} No data {{/if}} diff --git a/ghost/admin/app/components/gh-member-settings-form.js b/ghost/admin/app/components/gh-member-settings-form.js index 5f6ded3f6b..eaca3a8bcf 100644 --- a/ghost/admin/app/components/gh-member-settings-form.js +++ b/ghost/admin/app/components/gh-member-settings-form.js @@ -56,6 +56,16 @@ export default Component.extend({ return null; }), + customer: computed('subscriptions.[]', function () { + let customer = this.subscriptions.firstObject?.customer; + if (customer) { + return Object.assign({}, this.subscriptions.firstObject?.customer, { + startDate: this.subscriptions.firstObject?.startDate + }); + } + return null; + }), + actions: { setProperty(property, value) { this.setProperty(property, value);