-
Notifications
You must be signed in to change notification settings - Fork 67
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 not allowed page when clicking Set up WooPayments from Core and account is already onboarded #7652
Fix not allowed page when clicking Set up WooPayments from Core and account is already onboarded #7652
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: 0 B Total Size: 1.44 MB ℹ️ View Unchanged
|
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.
Testing instructions checked out (including bonus one)! Good job, Oleks! 🚢 it!
Regarding tech debt, @oaratovskyi, I think we should have an issue for normalizing and reducing the redirect logic, so we don't get to pile on more conditional branches to the logic. For that issue, we should strive to have a stable, catch-all logic that would prevent any other such issues in the future (no more ending up on pages with "Sorry you are not allowed"). WDYT? |
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 Oleks! I've tested it with the builder (test) account but I imagine this issue would also be occurring with live accounts, so this is perfect.
I do agree with @vladolaru, this seems like a painful area where we tend to have issues and have to revisit quite often. Can you create a tech debt issue in component onboarding pointing to this change and conversation to get the context? 💯
…-for-completed-accounts' into fix/7625-fix-setup-payments-task-for-completed-accounts
Thanks mates for your reviews! I made a fix to the bug spotted by e2e tests, could you please run the tests one more time? 🙏 |
Sure thing! I'll create one and link to this issue. |
Tested again, @oaratovskyi! Works as expected. Thanks for the fix. |
Created #7654 that will address redirects logic |
Created #7655 that will improve statuses logic |
Fixes #7625
Description
Merchants currently observe an issue with Set up WooPayments task: when account is fully onboarded, the link redirect them to
payments/onboarding
which results in Not allowed page errorChanges proposed in this Pull Request
I decided that the best experience for merchants will be to get redirected to
payments/overview
page if the account is fully onboarded. I'll create a tech debt issue for that if that sounds good!Important
Tests are not added since there is no tests for
maybe_handle_onboarding
function. Creating tests for it seems like out of scope for this PR.Testing instructions
develop
branch)fix/7625-fix-setup-payments-task-for-completed-accounts
payments/overview
Bonus: test that Set up WooPayments link works well when we don't have onboarded account.
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge