diff --git a/ghost/members-api/lib/repositories/product.js b/ghost/members-api/lib/repositories/product.js index 73b5c6632c..3a88e6b4c6 100644 --- a/ghost/members-api/lib/repositories/product.js +++ b/ghost/members-api/lib/repositories/product.js @@ -134,6 +134,7 @@ class ProductRepository { const productData = { type: 'paid', + active: true, name: data.name, description: data.description, benefits: data.benefits @@ -277,8 +278,13 @@ class ProductRepository { benefits: data.benefits }; + if (Reflect.has(data, 'active')) { + productData.active = data.active; + } + if (existingProduct.get('type') === 'free') { delete productData.name; + delete productData.active; } let product = await this._Product.edit(productData, {