-
Notifications
You must be signed in to change notification settings - Fork 69
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
Redirection to WooPay Not Triggering on Shortcode Checkout Pages #8398
Comments
Doesn't look intentional, however, we are moving away from the auto-redirect as part of the Direct Checkout project. The only use case that will remain that triggers the OTP modal is a signed out shopper that manually enters the email address. |
@bborman22 worth working on this one? As part of Direct Checkout I had wanted the auto-redirect to be suppressed and for the OTP to only display when the shopper is manually keying in the email address. However it sounds like this was achieved unintentionally? |
@asumaran I was thinking this issue could be a good one to pick up as you get into some of the Direct Checkout work. To summarize, the original bug listed is actually very close to how we want it to operate and this issue can be repurposed to confirm the following:
This issue will likely involve some removal of code (like calls to |
@bborman22 Thanks. I'll take a look at this. |
@asumaran the thinking is that since Direct Checkout now gets signed in shoppers to WooPay directly, that leaves non-WooPay shoppers and signed out shoppers to address. For signed-out WooPay shoppers, if the form field is pre-filled or they've used autofill, eliminating the on-page load OTP is less intrusive. And we want to respect shopper choice by not trying to force them to sign-in so aggressively. Fine balance. Thanks for picking this up. |
@bborman22 @pierorocca If a signed in shopper go to the checkout page and the email is populated it shouldn't redirect to WooPay right? If they type their WooPay email it should open the OTP page or should be redirected automatically given that they are already signed in on WooPay? |
Correct. Once we enable direct checkout for all merchants signed in shoppers shouldn't get to store checkout page with the exception of being in Hosted Checkout and clicking "alternative payment methods". The idea is to prevent the redirect on page load as it's an aggressive experience |
@pierorocca just to double check. We shouldn't redirect only if the direct checkout feature is enabled for the site? If the feature is disabled, we should redirect the user (if the email is already present) on page load just like before? Or should we remove the auto redirect completely? |
Good question. Let's remove the auto-redirect completely. Doesn't make sense for a shopper to have checkout loaded and then be redirected to another checkout. |
Just to be clear, we'll be removing all auto-redirects from checkout page even if the shopper entered their email on checkout (not pre-populated)? |
@bborman22 removing all on page load auto-redirects. The redirects related to entering an email, post page load, remain. |
Yes, that's right. I am only removing the automatic redirect when the page loads. Those already logged into WooPay will still be redirected after manually entering a valid WooPay email. cc @bborman22 |
Describe the bug
Users with matching WooPay email addresses are not automatically redirected to WooPay during the checkout process on stores using shortcode checkout pages. This issue arose after implementing a new precondition check for WooPayments activation within the shop (see #8116). The core of the problem lies in the reliance on the
wc/store/payment
store, which only is working within the checkout block context, returning an empty object in shortcode checkouts. This results in the redirection condition failing (hasWCPayPaymentMethod = false
).To Reproduce
Prerequisites:
Actual behavior
The expected behavior of redirecting to WooPay or displaying the OTP authentication iframe does not occur upon page load.
Screenshots
Screen.Recording.2024-03-15.at.10.54.56.mov
Expected behavior
To maintain compatibility with shortcode checkouts, an alternative method to verify WooPayments activation in the shop, applicable outside the checkout block context, is required.
The text was updated successfully, but these errors were encountered: