Improve redirects logic in payments #7654
Labels
category: core
WC Payments core related issues, where it’s obvious.
component: onboarding
Onboarding merchant in KYC, dev vs live, etc
focus: account lifecycle
priority: medium
The issue/PR is medium priority—non-critical functionality loss, minimal effect on usability
size: medium
The issue is sized medium.
status: on hold
The issue is currently not prioritized.
type: technical debt
This issue/PR represents/solves the technical debt of the project.
Description
At the moment, we have quite complex redirects logic in
WC_Payments_Account
. First, we have a lot of hooks around the topic:Second, there is a big function
maybe_handle_onboarding
that also contains logic around redirects, see a couple of examples (not all):After conversation in #7652 (comment), we decided to normalize and reduce the redirect logic, so we don't get to pile on more conditional branches to the logic.
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").
Dev ideas
The text was updated successfully, but these errors were encountered: