0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-25 02:31:59 -05:00

Fixed offer links signup type for logged in members

- logged in members need a special checkoutType metadata in api payload to avoid sending login link email
This commit is contained in:
Rishabh 2022-02-18 00:27:11 +05:30
parent c0500c1a40
commit 58f2025038

View file

@ -98,7 +98,7 @@ export default class App extends React.Component {
}
/** Setup custom trigger buttons handling on page */
setupCustomTriggerButton(props) {
setupCustomTriggerButton() {
if (hasMode(['test'])) {
return;
}
@ -595,7 +595,11 @@ export default class App extends React.Component {
this.dispatchAction('openPopup', {
page: 'loading'
});
this.dispatchAction('signup', {plan: price.id, offerId});
if (member) {
this.dispatchAction('checkoutPlan', {plan: price.id, offerId});
} else {
this.dispatchAction('signup', {plan: price.id, offerId});
}
} else {
this.dispatchAction('openPopup', {
page: 'offer',