-
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
Earn: Add a Stripe connect prompt to the Donations block. #43166
Conversation
Doesn't work yet. |
Caution: This PR affects files in the FSE Plugin on WordPress.com D44771-code has been created so you can easily test it on your sandbox. See this FieldGuide page about developing in the FSE Plugin for more info: PCYsg-ly5-p2 |
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. |
d657c1d
to
daec76a
Compare
This now handles the Stripe connection process, but the redirect back to the post being edited is still broken. I also need to add Tracks events. |
It looks like this is expected behaviour, although I think it's exposing other possible bugs or changes with the Recurring Payments/Premium Content blocks' handling of Stripe connecting. I suggest we get this PR in as-is, and then evaluate how best the Stripe connect flow should be with all of the blocks requiring it. Currently, a successful connection will land the user on the Calypso Earn page: Reloading the post with the block will go straight to displaying the donations tabs, as expected. |
90c2c8d
to
c9667a5
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.
Awesome, verified the nudge only appears when the connection is not set, and it disappear afterwards.
I suggest we get this PR in as-is, and then evaluate how best the Stripe connect flow should be with all of the blocks requiring it
+1
Verify a Tracks event in the console for
wpcom_block_donations_stripe_connect_click
.
I didn't see this initially, but then realized I didn't update my wpcom-block-editor
build. It worked great after that. Updated the testing instructions for clarity.
This PR adds a Stripe connection prompt to the (in development) Donations block, for sites that have the appropriate plan but have not yet set themselves up with Stripe.
Testing instructions
yarn dev --sync
to sync the changes to your sandbox.wpcom-block-editor
build generated on this PR:./bin/calypso/build-wpcom-block-editor.sh 770978
.widgets.wp.com
, the store, and a test site that has at least a Personal plan, but no Stripe account connected./wp-admin/post-new.php
.localStorage.setItem( 'debug', 'wpcom-block-editor:*' );
.wpcom_block_donations_stripe_connect_click
.