From cfa766c4e43eba12a4c773784fe5d8c51aea780c Mon Sep 17 00:00:00 2001 From: Nazar Gargol Date: Tue, 10 Mar 2020 15:15:48 +0800 Subject: [PATCH] Cleaned up use of members `isPaid` flag refs https://github.com/TryGhost/Ghost/pull/11651 - The flag is being removed from the backend, so can be safely removed on client as well --- ghost/admin/app/components/gh-members-lab-setting.js | 5 +---- ghost/admin/app/services/settings.js | 1 - ghost/admin/mirage/fixtures/settings.js | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ghost/admin/app/components/gh-members-lab-setting.js b/ghost/admin/app/components/gh-members-lab-setting.js index 85552d97bf..0f2ba2292d 100644 --- a/ghost/admin/app/components/gh-members-lab-setting.js +++ b/ghost/admin/app/components/gh-members-lab-setting.js @@ -127,10 +127,7 @@ export default Component.extend({ stripeConfig.product = { name: this.settings.get('title') }; - // TODO: this flag has to be removed as it doesn't serve any purpose - if (key === 'isPaid') { - subscriptionSettings.isPaid = event; - } + if (key === 'secret_token' || key === 'public_token') { stripeConfig[key] = event.target.value; } diff --git a/ghost/admin/app/services/settings.js b/ghost/admin/app/services/settings.js index 7ab47d255d..69ce781209 100644 --- a/ghost/admin/app/services/settings.js +++ b/ghost/admin/app/services/settings.js @@ -79,7 +79,6 @@ export default Service.extend(_ProxyMixin, ValidationEngine, { return JSON.parse(settingsString); } catch (e) { return { - isPaid: false, allowSelfSignup: true, fromAddress: 'noreply', paymentProcessors: [{ diff --git a/ghost/admin/mirage/fixtures/settings.js b/ghost/admin/mirage/fixtures/settings.js index 2969121240..31f766875b 100644 --- a/ghost/admin/mirage/fixtures/settings.js +++ b/ghost/admin/mirage/fixtures/settings.js @@ -177,7 +177,7 @@ export default [ id: 23, type: 'members', key: 'members_subscription_settings', - value: '{"isPaid":false,"allowSelfSignup":true,"fromAddress":"noreply","paymentProcessors":[{"adapter":"stripe","config":{"secret_token":"","public_token":"","product":{"name":"Ghost Subscription"},"plans":[{"name":"Monthly","currency":"usd","interval":"month","amount":""},{"name":"Yearly","currency":"usd","interval":"year","amount":""}]}}]}', + value: '{"allowSelfSignup":true,"fromAddress":"noreply","paymentProcessors":[{"adapter":"stripe","config":{"secret_token":"","public_token":"","product":{"name":"Ghost Subscription"},"plans":[{"name":"Monthly","currency":"usd","interval":"month","amount":""},{"name":"Yearly","currency":"usd","interval":"year","amount":""}]}}]}', created_at: '2019-10-09T09:49:00.000Z', created_by: 1, updated_at: '2019-10-09T09:49:00.000Z',