mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Added manual check for stripe connect integration
no-issue We had a circular dependency issue when using the members service, so this commit replaces the use of that with a check to the settings cache to check if stripe connect has been setup.
This commit is contained in:
parent
2418594651
commit
4525fa65b0
1 changed files with 3 additions and 1 deletions
|
@ -43,11 +43,13 @@ function getMembersHelper() {
|
|||
const stripeSecretToken = stripePaymentProcessor.config.secret_token;
|
||||
const stripePublicToken = stripePaymentProcessor.config.public_token;
|
||||
|
||||
const stripeConnectIntegration = settingsCache.get('stripe_connect_integration');
|
||||
|
||||
let membersHelper = `<script defer src="${getAssetUrl('public/members.js', true)}"></script>`;
|
||||
if (config.get('enableDeveloperExperiments')) {
|
||||
membersHelper = `<script defer src="https://unpkg.com/@tryghost/members-js@latest/umd/members.min.js"></script>`;
|
||||
}
|
||||
if (!!stripeSecretToken && stripeSecretToken !== '' && !!stripePublicToken && stripePublicToken !== '') {
|
||||
if ((!!stripeSecretToken && !!stripePublicToken) || !!stripeConnectIntegration.account_id) {
|
||||
membersHelper += '<script src="https://js.stripe.com/v3/"></script>';
|
||||
}
|
||||
return membersHelper;
|
||||
|
|
Loading…
Reference in a new issue