mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
🐛 Fixed creation of extra customer when updating plans
no issue - `customers` property contains an array of customer for which 'for..of' syntax is more appropriate - Bug was causing creation of multiple customers in Stripe when new checkout session was initiated for existing customer - Discussed in https://github.com/TryGhost/Members/pull/90/files#r368889289
This commit is contained in:
parent
92b3cc3758
commit
726ffaf1f8
1 changed files with 1 additions and 1 deletions
|
@ -262,7 +262,7 @@ module.exports = class StripePaymentProcessor {
|
|||
async _customerForMemberCheckoutSession(member) {
|
||||
const metadata = await this.storage.get(member);
|
||||
|
||||
for (const data in metadata.customers) {
|
||||
for (const data of metadata.customers) {
|
||||
try {
|
||||
const customer = await this.getCustomer(data.customer_id);
|
||||
if (!customer.deleted) {
|
||||
|
|
Loading…
Add table
Reference in a new issue