[Woo POS - payments onboarding] Update WooPayments setup URL from Payments Overview to Payments Connect #14297
+3
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #14296
Why
As recommended by the WooPayments web team in pdfdoF-5Bo-p2#comment-6655:
This PR aims to change the payments setup URL from Payments Overview to Payments Connect.
After testing on a few sites (Pressable, WPCOM, JN), the Payments Overview (when tapping on the Payments menu on the left sidebar in wp-admin) and Payments Connect are the same right now. Conceptually, the Connect page makes more sense to set up / connect the payments account while the Overview page might contain other information that could distract the merchant away from connecting the account.
How
This PR only changes the URL from Payments Overview to Payments Connect.
The addition of a
from
parameter will be in a separate PR as it involves more code changes that I'm less sure about.There are two use cases of the payments setup URL:
InPersonPaymentsPluginNotSetup
InPersonPaymentsStripeAccountOverdue
Steps to reproduce
Since this change affects the existing onboarding flow for all entry points (POS, IPP, Payments menu), I think focusing on testing the most critical flow, IPP, is the best use of time.
Stripe overdue
Prerequisite: store payment gateway is active and set up but account has
account.wcpayStatus == .restricted && account.hasOverdueRequirements
. Alternatively, you can hard code the state by returning.stripeAccountOverdueRequirement(plugin: .wcPay)
at the beginning ofCardPresentPaymentsOnboardingUseCase.checkOnboardingState
.Card Reader
--> an onboarding modal should be shown. after the loading state, the Stripe overdue UI should be shownResolve Now
--> a webview should be shown. log in to wp-admin if needed for WPCOM login. the webview should show how to connect to the payment account, and should be the same as when tapping on the Payments tab on the left sidebarPayments plugin not set up
Prerequisite: store payment gateway is active but isn't set up completely. Alternatively, you can hard code the state by returning
.pluginSetupNotCompleted(plugin: .wcPay)
at the beginning ofCardPresentPaymentsOnboardingUseCase.checkOnboardingState
.Card Reader
--> an onboarding modal should be shown. after the loading state, the plugin not set up UI should be shownFinish Setup in Store Admin
--> a webview should be shown. log in to wp-admin if needed for WPCOM login. the webview should show how to connect to the payment account, and should be the same as when tapping on the Payments tab on the left sidebarTesting information
I couldn't reproduce the actual scenario of "Stripe overdue" onboarding state, so I tested by manually returning the state in code.
Screenshots
Example for the "plugin not set up" error:
Simulator.Screen.Recording.-.iPad.Pro.11-inch.M4.-.2024-11-04.at.12.59.56.mp4
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: