0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

🐛 Fixed order for "Complimentary" plan creation

no issue

- When new Ghost instance is initialized "Complimentary" plan doesn't have to wait for the rest of plans to be configured.
- Without configured plans the admin would still be able  to assign "Complimentary" plan to members or import same kind of members.
- There is no error handling at the moment when plan initialization fails, that's why it was very confusing when all of the sudden it wasn't possible to create a member record
This commit is contained in:
Nazar Gargol 2020-02-11 17:14:41 +08:00
parent 5caf924013
commit 51c2b22e9f

View file

@ -51,7 +51,8 @@ function getStripePaymentConfig() {
return null;
}
stripePaymentProcessor.config.plans.push(COMPLIMENTARY_PLAN);
// NOTE: "Complimentary" plan has to be first in the queue so it is created even if regular plans are not configured
stripePaymentProcessor.config.plans.unshift(COMPLIMENTARY_PLAN);
const webhookHandlerUrl = new URL('/members/webhooks/stripe', siteUrl);