-
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
Refresh cart/checkout page when ECE or PRBs are dismissed #9794
Comments
Hey team! Please add your planning poker estimate with Zenhub @asumaran @cesarcosta99 @lovo-h @rafaelzaleski @reykjalin @ricardo |
@pierorocca, following a discussion with @bborman22, we believe it would be helpful to run the proposed flow by you to clarify a few specific points:
@frosso, how would this implementation interact with tokenized carts, especially in scenarios where they are kept separate from the session cart? |
Keep in mind that the interaction with the ECE dialog would not exclude changes to the shipping address. i.e.: the shipping address might be updated for physical cart contents as soon as the dialog is opened.
The tokenized cart is kept separate from the main customer's cart only when the ECE dialog is opened on the product page - on the product page scenario, the main customer's cart remains unaffected. I guess it could be considered an inconsistency with the express checkout button behavior on cart and checkout since the main cart is interacted with on those pages. |
@rafaelzaleski can we technically replicate this behavior, excluding the fact there's no lightbox overlay? |
Interestingly, Shopify doesn't seem to have the limitation we have with Stripe & ECE buttons w/ UK (or CA) addresses. Currently, we need to account for possibly redacted data coming from ECE when a UK or CA shipping address is selected: woocommerce-payments/includes/express-checkout/class-wc-payments-express-checkout-button-helper.php Lines 1076 to 1098 in 476c528
This behavior can be observed in the test WooPayments test environment when selecting a UK address: You'll notice that the ECE/GooglePay/ApplePay won't provide full address data - the ZIP code in particular is also redacted (the value provided is Similar behavior for CA addresses: I tested the flow on Shopify by adding a GB address. I wonder if this could become a limitation on our end 😬 but normally, updating the screen in the background of the block-based cart & checkout shouldn't be too tricky. We can just dispatch the The problem arises more on the shortcode cart & checkout, since they don't have a similar action we could use (AFAIK). And still, I don't know what the implications of the address being potentially redacted could be. |
Redacted zip aside, for Blocks which the goal is to increase adoption this year, let's go with the real-time refresh. For shortcode, page refresh on modal close or any other option that shows the data selected in the payment sheet. Thanks for the research @frosso and the visuals. |
Nice UX optimization all. The little touches matter. |
Description
When GooglePay/ApplePay dialogs are triggered on the cart or checkout pages (both shortcode and block-based), the customer's shipping address is submitted to the backend to update the cart. Within these dialogs, the customer can further interact with the ECE, such as:
If the customer dismisses the payment dialog without completing the payment, the underlying cart/checkout page remains in its original state without reflecting any updates from the GooglePay/ApplePay dialog interaction.
This behavior leads to an inconsistency: the changes appear lost on the cart/checkout page but are correctly stored and shown after a page refresh or navigation.
To improve user experience and maintain state consistency:
This affects both blocks and shortcode implementation.
This affects both cart and checkout pages.
Screen.Recording.2024-11-22.at.5.53.25.PM.mov
Acceptance criteria
Designs
N/A
Testing instructions
Dev notes
Additional context
The text was updated successfully, but these errors were encountered: