mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-01 13:54:35 +03:00
Added upgrade checkout metadata for stripe
no issue Ghost sends email on successful signup to a paid plan via Stripe checkout, but couldn't differentiate between a Stripe checkout as new member or as an upgrade previously. This led to an extra second email with magic link on upgrading to paid plan while logged in. Passing `checkoutType` metadata to Stripe checkout allows webhook to ignore second email in case of an upgrade scenario.
This commit is contained in:
parent
168fb204eb
commit
b590a1fa90
@ -114,7 +114,10 @@ async function checkoutPlan({data, state, api}) {
|
||||
try {
|
||||
const {plan} = data;
|
||||
await api.member.checkoutPlan({
|
||||
plan
|
||||
plan,
|
||||
metadata: {
|
||||
checkoutType: 'upgrade'
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user