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:
parent
8483ba162d
commit
28570bd3ea
1 changed files with 5 additions and 0 deletions
|
@ -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});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue