Replaced existing members script with new (behind dev exp)

refs https://github.com/TryGhost/members.js/issues/36

- Replaces existing members.js with new script which covers existing functionality as well as adds new ones
- This is behind developer experiments flag atm
This commit is contained in:
Rish 2020-05-28 10:42:31 +05:30 committed by Rishabh Garg
parent 3471a21bc3
commit 65b9072fe2

View File

@ -44,6 +44,9 @@ function getMembersHelper() {
const stripePublicToken = stripePaymentProcessor.config.public_token;
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 !== '') {
membersHelper += '<script src="https://js.stripe.com/v3/"></script>';
}