0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Fixed portal plan links for data attributes

no refs

- Portal plan checkout links were incorrectly passing empty plan and not opening Stripe checkout, fixed.
This commit is contained in:
Rish 2020-11-20 15:13:38 +05:30
parent 8483ba162d
commit 28570bd3ea

View file

@ -67,6 +67,11 @@ export default class App extends React.Component {
const pagePath = (target && target.dataset.portal);
const {page, pageQuery} = this.getPageFromLinkPath(pagePath) || {};
if (this.state.initStatus === 'success' && !this.state.member && ['monthly', 'yearly'].includes(pageQuery) && hasPlan({site: this.state.site, plan: pageQuery})) {
removePortalLinkFromUrl();
this.onAction('signup', {plan: capitalize(pageQuery)});
}
if (page) {
this.onAction('openPopup', {page, pageQuery});
}