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:
parent
4c7860483e
commit
a08690363e
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue