-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow one click upsell for the plan upgrade nudge #47774
Allow one click upsell for the plan upgrade nudge #47774
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
d474f78
to
6b1142c
Compare
5b8750f
to
55f9ec4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything works well 👍
Found one issue when I upgrade from Calypso's /plans page to a Premium plan - I am getting the wrong Thank You page.
To reproduce:
- Log in to Calypso, head to /plans page, and upgrade to Premium
- After Premium purchase completes, accept the Business bump offer
- Complete the one-click purchase of the Business plan
I saw a Thank You page for the Premium plan whereas I expected it to be for the Business plan I just purchased.
@@ -193,13 +197,13 @@ export function upsellNudge( context, next ) { | |||
let upgradeItem; | |||
|
|||
if ( context.path.includes( 'offer-quickstart-session' ) ) { | |||
upsellType = 'concierge-quickstart-session'; | |||
upsellType = CONCIERGE_QUICKSTART_SESSION; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this refactor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine from a checkout point-of-view, although Niranjan's comment above is relevant. Please, if you modify the getThankYouUrl
function, update the associated tests!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I purchase a Premium monthly plan, and then upgrade via the offer page, then the one-click modal does not indicate that the plan is of type monthly.
For comparison, if you upgrade from Premium monthly to Business monthly, then this is how the checkout page looks. It shows that plan is of type monthly, and displays a striked out price:
This is how it looks in the one-click modal. Notice that both are missing.
This is probably not a blocker for this PR and can be taken as a follow up. cc @victorespigares for opinion.
@@ -46,6 +46,14 @@ import { isMonthly } from 'calypso/lib/plans/constants'; | |||
* Style dependencies | |||
*/ | |||
import './style.scss'; | |||
import { getPlanByPathSlug } from 'calypso/lib/plans'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be under Internal dependencies, instead of under Style dependencies.
b579797
to
321ef22
Compare
I forgot, the upsell still uses the old |
I have addressed everything except the monthly pricing bug, @niranjan-uma-shankar can you have another look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
321ef22
to
adcfdec
Compare
* Allow one click upsell for plan upgrade nudge * Dynamically resolve product slug based on the upsell type and upgraded item if applicable * Map correct reciept id to be shown in thank you page * Remove merge conflict * Remove duplicate import and other merge conflicts Co-authored-by: Niranjan Uma Shankar <[email protected]>
Changes proposed in this Pull Request
Support feature provided in #45350 for plan upgrade upsell nudge.
Testing instructions
1-Register new site by going to http://calypso.localhost:3000/start/domains
2-Select the premium plan in the plans step
3-Complete purchase on checkout using a credit card
3-In the up-sell nudge click on Yes, I need plugins for my site!
4-The following modal should appear