Skip to content
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

Fix broken onboarding with a live account #3335

Merged

Conversation

diegocurbelo
Copy link
Member

@diegocurbelo diegocurbelo commented Aug 2, 2024

Fixes #3320 (comment)

Changes proposed in this Pull Request:

This PR fixes the error introduced in #3320, where the transient was been overwritten when rendering 2 Connect OAuth URLs (Live and test).

Before this fix, after choosing (or creating) the account on the Stripe site, the redirect validation failed, and the merchant was redirected again to the onboarding screen:

image

Testing instructions

  1. Disconnect from Stripe (if needed)
    Screenshot_2024-08-02_at_2_43_31 PM
  2. Navigate to WP-Admin > WooCommerce > Settings > Payments > Stripe
  3. Click on the Create or connect an account, and complete the onboarding on the Stripe site (create or choose an account from the list)
    Screenshot_2024-08-02_at_2_46_58 PM
  4. Check that the redirect is successful, the plugin is enabled in live mode, and the email in the Account details is correct:
    Screenshot 2024-08-02 at 2 49 18 PM

  • Covered with tests (or have a good reason not to test in the description ☝️)
  • Added changelog entry in both changelog.txt and readme.txt (or does not apply)
  • Tested on mobile (or does not apply)

Post merge

@diegocurbelo diegocurbelo marked this pull request as ready for review August 2, 2024 17:56
@diegocurbelo diegocurbelo requested review from a team, Mayisha and a-danae and removed request for a team August 2, 2024 17:56
Copy link
Contributor

@Mayisha Mayisha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @diegocurbelo for fixing this 👍

In develop branch I can reproduce this in two scenarios-

  • First scenario is when Stripe is disconnected and I click the Create or connect an account button on the onboarding screen. After choosing an account I am redirected again to the onboarding screen.
  • Second scenario is when the test account is connected and I click the Create or connect an account button on the account connection modal. After choosing an account I am redirected to the Stripe settings page just fine, but the live account is still disconnected.

In this branch both of the above issues are fixed.
✅ Connecting to a live account from the onboarding page works.
✅ Connecting to a live account from the account connection modal when the test account is connected also works.

@diegocurbelo diegocurbelo merged commit 82b48c2 into develop Aug 2, 2024
33 checks passed
@diegocurbelo diegocurbelo deleted the fix/3320-fix-live-onboarding-state-transient-check branch August 2, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants