diff --git a/core/frontend/helpers/ghost_head.js b/core/frontend/helpers/ghost_head.js
index 5e6041744b..223d4c0ee9 100644
--- a/core/frontend/helpers/ghost_head.js
+++ b/core/frontend/helpers/ghost_head.js
@@ -2,7 +2,7 @@
// Usage: `{{ghost_head}}`
//
// Outputs scripts and other assets at the top of a Ghost theme
-const {metaData, escapeExpression, SafeString, logging, settingsCache, config, blogIcon, labs} = require('../services/proxy');
+const {metaData, escapeExpression, SafeString, logging, settingsCache, members, config, blogIcon, labs} = require('../services/proxy');
const _ = require('lodash');
const debug = require('ghost-ignition').debug('ghost_head');
@@ -37,17 +37,11 @@ function finaliseStructuredData(metaData) {
}
function getMembersHelper() {
- const stripePaymentProcessor = settingsCache.get('members_subscription_settings').paymentProcessors.find(
- paymentProcessor => paymentProcessor.adapter === 'stripe'
- );
- const stripeSecretToken = stripePaymentProcessor.config.secret_token;
- const stripePublicToken = stripePaymentProcessor.config.public_token;
-
let membersHelper = ``;
if (config.get('enableDeveloperExperiments')) {
membersHelper = ``;
}
- if (!!stripeSecretToken && stripeSecretToken !== '' && !!stripePublicToken && stripePublicToken !== '') {
+ if (members.config.isStripeConnected()) {
membersHelper += '';
}
return membersHelper;
diff --git a/core/frontend/services/proxy.js b/core/frontend/services/proxy.js
index 720ad17172..6d51835fd0 100644
--- a/core/frontend/services/proxy.js
+++ b/core/frontend/services/proxy.js
@@ -27,6 +27,9 @@ module.exports = {
// TODO: Only expose "get"
settingsCache: settingsCache,
+ // TODO: Rethink how we get config in
+ members: require('../../server/services/members'),
+
// These 3 are kind of core and required all the time
errors,
i18n,