mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Updated stripe_plans & portal_plans settings
refs https://github.com/TryGhost/Team/issues/586 We are no longer using the `stripe_plans` setting, instead we are using the `stripe_prices` database table. However, we must keep the setting as the migration from the setting to the database is not done as a standard migration, but in code. This means our code has to still read and pass the setting because we will never know if the migration in code has run yet. The `portal_plans` setting has been updated to only include 'free' by default, because the setting must include id's now rather than names.
This commit is contained in:
parent
420ab29039
commit
a138586c83
3 changed files with 4 additions and 11 deletions
|
@ -282,7 +282,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"stripe_plans": {
|
||||
"defaultValue": "[{\"name\":\"Monthly\",\"currency\":\"usd\",\"interval\":\"month\",\"amount\":500},{\"name\":\"Yearly\",\"currency\":\"usd\",\"interval\":\"year\",\"amount\":5000}]",
|
||||
"defaultValue": "[]",
|
||||
"type": "array"
|
||||
},
|
||||
"stripe_connect_publishable_key": {
|
||||
|
@ -324,7 +324,7 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"portal_plans": {
|
||||
"defaultValue": "[\"free\", \"monthly\", \"yearly\"]",
|
||||
"defaultValue": "[\"free\"]",
|
||||
"type": "array"
|
||||
},
|
||||
"portal_button_style": {
|
||||
|
|
|
@ -3,13 +3,6 @@ const crypto = require('crypto');
|
|||
const createKeypair = require('keypair');
|
||||
const path = require('path');
|
||||
|
||||
const COMPLIMENTARY_PLAN = {
|
||||
name: 'Complimentary',
|
||||
currency: 'usd',
|
||||
interval: 'year',
|
||||
amount: '0'
|
||||
};
|
||||
|
||||
class MembersConfigProvider {
|
||||
/**
|
||||
* @param {object} options
|
||||
|
@ -190,7 +183,7 @@ class MembersConfigProvider {
|
|||
product: {
|
||||
name: this._settingsCache.get('stripe_product_name')
|
||||
},
|
||||
plans: [COMPLIMENTARY_PLAN].concat(this._settingsCache.get('stripe_plans') || []),
|
||||
plans: this._settingsCache.get('stripe_plans') || [],
|
||||
appInfo: {
|
||||
name: 'Ghost',
|
||||
partner_id: 'pp_partner_DKmRVtTs4j9pwZ',
|
||||
|
|
|
@ -34,7 +34,7 @@ describe('DB version integrity', function () {
|
|||
// Only these variables should need updating
|
||||
const currentSchemaHash = '7886f066821a240b85c6b61ba2dcff65';
|
||||
const currentFixturesHash = '8671672598d2a62e53418c4b91aa79a3';
|
||||
const currentSettingsHash = 'c202cf5780aa77d8730a82680e2b142e';
|
||||
const currentSettingsHash = '5529b6fd5ee65b65bb78954fd721b248';
|
||||
const currentRoutesHash = '3d180d52c663d173a6be791ef411ed01';
|
||||
|
||||
// If this test is failing, then it is likely a change has been made that requires a DB version bump,
|
||||
|
|
Loading…
Reference in a new issue