mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Added stripe connect guard for saving product
no refs While saving on membership screen, we also try and save the product with any prices that have changed. In case Stripe is not connected, saving Product doesn't make sense as we should not edit prices for the default product without Stripe connection.
This commit is contained in:
parent
1b491aa083
commit
757f061362
1 changed files with 2 additions and 1 deletions
|
@ -271,7 +271,8 @@ export default class MembersAccessController extends Controller {
|
|||
}
|
||||
|
||||
async saveProduct() {
|
||||
if (this.product) {
|
||||
const isStripeConnected = this.settings.get('stripeConnectAccountId');
|
||||
if (this.product && isStripeConnected) {
|
||||
const stripePrices = this.product.stripePrices || [];
|
||||
const monthlyAmount = this.stripeMonthlyAmount * 100;
|
||||
const yearlyAmount = this.stripeYearlyAmount * 100;
|
||||
|
|
Loading…
Add table
Reference in a new issue