0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

Updated product repo to allow editing price names (#265)

refs https://github.com/TryGhost/Team/issues/616

For existing prices linked to a Product, we only allow site owners/admins to edit their nickname and nothing else. This change handles the update in Ghost, but needs extension to update the name in Stripe as well.
This commit is contained in:
Rishabh Garg 2021-04-23 21:46:07 +05:30 committed by GitHub
parent 4c7860483e
commit a08690363e

View file

@ -211,6 +211,13 @@ class ProductRepository {
type: existingPrice.type,
interval: existingPrice.interval
}, options);
} else {
await this._StripePrice.edit({
nickname: existingPrice.nickname
}, {
...options,
id: existingPrice.id || options.id
});
}
}