-
Notifications
You must be signed in to change notification settings - Fork 812
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
Recurring Payments: Use Upgrade and Stripe Nudges #13394
Recurring Payments: Use Upgrade and Stripe Nudges #13394
Conversation
This is an automated check which relies on |
9b8dc30
to
ecfc07f
Compare
ecfc07f
to
52ae9c7
Compare
94b5bd2
to
d72a07b
Compare
Fusion didn't work, so I generated the WP.com counterpart manually: D32570-code. |
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.
It seems that we should take the filter value into account rather than checking whether a site is a Jetpack site.
a7e7d2d
to
a0fa3c7
Compare
I couldn't reproduce the issue but for little while I ended up directed to "plans" page right from the checkout, without having change to buy the plan. Then I went to Jetpack plans page, pressed "upgrade to personal" and the checkout step didn't redirect me. I noticed the URL having two additional ARGs upgrade nudge button didn't have: Now the upgrade nudge works without issues, too. This was happening with totally fresh Jetpack Docker site, on free plan, connected as primary user. |
…t value is changed
This fixes a regression where the block was not registered when viewed on the frontend.
This reverts commit 12d1fda.
5d33855
to
c82a4d7
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.
For some reason, --color-wpcom didn't work (wasn't found). `--color-blue` does work and feels anyway better, less wpcom specific variable here. Both should be `$muriel-blue-500` anyway.
True, while the placeholder button lets you play with the button's appearance (including text) it can be confusing. It's still better than it was before when there was no indication of any kind how the block might look like after plan purchase + stripe connection, so I'd say not a blocker here and good for a follow up some another time. |
I rebased this PR with Calypso-build v4 update (#13503) and fixed Stripe star colors that broke in the update: |
Ok. It does look off to me, so I'd definitely vote for a follow-up! Other than that, everything looks good to me. |
I'll think about it and see if there's a creative easy win. :-) Thanks! |
Synced Stripe color modifications in r197337-wpcom |
Fusion didn't work, so I generated the WP.com counterpart manually: D32570-code.
Take Two of #13233, which was getting a bit noisy. This time, I'm also adding the Stripe Connect nudge since it's rather hard to do add each nudge in a separate PR, due to the block's UX. Thus, this PR is essentially implementing mockups from p8hgLy-1RC-p2 (with some limitations, see below).
The Stripe Nudge is used both on Jetpack and WP.com, wheras the Upgrade Nudge is only used when the relevant filter returns true (i.e. currently only on WP.com).
Changes proposed in this Pull Request:
Add an UpgradeNudge and a Stripe Connect Nudge to the Recurring Payments block to replace UI that's currently part of the block itself.
Screenshots
Before
After
Is this a new feature or does it add/remove features to an existing part of Jetpack?
The Recurring Payments block isn't new; we're just using the Upgrade Nudge, and introducing the Stripe Connect Nudge to replace some previously in-button messaging.
Testing instructions:
On Jetpack, verify that the Stripe Nudge is now shown if the site is on a paid plan, but not yet connected to Stripe; furthermore, the Recurring Payments button will be previewed inside the block in that case. The block's behavior should otherwise be unchanged.
yarn build
), and start Docker (yarn docker:up
)Test the WP.com counterpart:
You can also simulate the WP.com behavior in JP by adding
<?php add_filter( 'jetpack_block_editor_enable_upgrade_nudge', '__return_true' );
to e.g.docker/mu-plugins/0-gutenpack.php
and applying the following diff on top of this PR to your local JP Docker install:Proposed changelog entry for your changes:
Add an Upgrade Nudge and a Stripe Connect Nudge to the Recurring Payments block to replace UI that's currently part of the block itself.
Differences from p8hgLy-1RC-p2
The reason is that the Upgrade Nudge is currently generically added upon block registration. We'd have to move it to individual blocks in order to customize its message, but that will have us face another problem (similar to item 4. below).
The reason is that unlike
calypso-i18n
, it's not straight-forward to add hyperlinks to parts of a translated string within the framework of@wordpress/i18n
. (There are a few ugly/fragile ways though.)I'd suggest we discuss each of these items separately to make a plan on how to proceed with them. I think that it's conceivable that we don't block this PR by them.