woocommerce / woocommerce-gateway-amazon-pay

Amazon Pay Gateway
20 stars 23 forks source link

Endless Loop in Checkout #47

Closed DalbertHab closed 10 months ago

DalbertHab commented 4 years ago

Describe the bug The checkout fragments are being loaded in an endless loop.

To Reproduce Steps to reproduce the behavior:

  1. Install Amazonpay & a plugin to enable "multi currency support" - we use Product Price based on Countries
  2. Add a product to cart
  3. Login with your Amazon Account
  4. Proceed to checkout
  5. The address fragment and the price fragment refreshes each other in an endless loop

Expected behavior After selecting an address of your amazon account, refresh the prices once.

Isolating the problem (mark completed items with an [x]):

See https://wordpress.org/support/topic/endless-loop-in-checkout/

Env

jessLundie commented 4 years ago

We claim compatibility with Price Based on Country in our documentation here: https://docs.woocommerce.com/document/amazon-payments-advanced/#section-5

Additional information from forum thread - @DalbertHab reports the following:

I checked the diffs between 1.11.1 and 1.12.2 and found the relevant line:

amazon-app-widgets.js – line 427 – onPaymentSelect: wcAmazonUpdateCheckoutAddresses

These line is added in 1.12.x and causes the infinite loop (function calls in post 1).

As a temporary workaround, rolling back to Amazon Pay 1.11.1 resolves this issue.

alexiglesias31 commented 10 months ago

Closing the ticket since the issue is not reproducible anymore.