-
Notifications
You must be signed in to change notification settings - Fork 814
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
Premium blocks: Add plan param to redirect URL - take 2 - simple sites #13281
Premium blocks: Add plan param to redirect URL - take 2 - simple sites #13281
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: September 3, 2019. |
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.
I am sent back to the editor with plan_upgraded=1
after purchase
Just noting that we'll also need to update the frontend nudge (both for Simple Sites, and Jetpack) 😬 jetpack/_inc/lib/components.php Lines 90 to 98 in d40347a
|
Can you tell me a little more about that? What is it and why are you referring to it explicitly as "frontend nudge"? 😀 |
"Frontend nudge" in this case means when the block is added and saved to the content, on the public-facing website there's a nudge visible only to admins. You can test it with simple payments block currently. |
What Mikael said :) "Frontend" as in HTML rendered for site visitors (vs "backend" as in wp-admin). We're using some magic to render our React component to some static HTML (that we actually turn into PHP to include translation calls, such as In this case, the required change should be fairly straight-forward 🤞 |
The "Frontend" URLs update would be fine to do in separate PR btw! |
Fixes #13003 (partially)
Related: Automattic/wp-calypso#35697
Changes proposed in this Pull Request:
Handles adding the
plan_upgraded=1
query param to simple site urls passed from the "upgrade nudge" in theredirect_to
param. We (@simison primarily) spotted that in #13218 we were only handling jetpack self-hosted sites. Effectively this will be passed on redirection once a plan has been upgraded successfully after clicking on the "upgrade nudge".The result after these changes is the user landing on the calypso block editor with a url of the form https://wordpress.com/block-editor/post/chriskmnds.wordpress.com/3?plan_upgraded=1
Is this a new feature or does it add/remove features to an existing part of Jetpack?
Testing instructions:
upgrade nudge
and purchase a premium plan to enable simple payments.&plan_upgraded=1
.Proposed changelog entry for your changes: