Automattic / woocommerce-payments

Accept payments via credit card. Manage transactions within WordPress.
https://wordpress.org/plugins/woocommerce-payments/
Other
173 stars 69 forks source link

Respect maximum order amount when adding the PMME to the page #9459

Open cesarcosta99 opened 4 weeks ago

cesarcosta99 commented 4 weeks ago

Describe the bug

Originally reported here. Similar to #9244, the container with ID payment-method-message is still added to the page and contains an empty Stripe iframe when a maximum order amount is hit. The skeleton loader appears too, but no PMME is displayed when loading is finished. The result is a loader that appears to load nothing and finally a dead space.

To Reproduce

  1. As a merchant, enable all BNPL payment methods.
  2. Set your currency to USD.
  3. Create a product that is more than $1,000,000.00.
  4. As a shopper, navigate to the product and see the dead space created by the PMME component.

Actual behavior

Dead space in the product page when all BNPL payment methods are active, currency is USD and the product is more than $1,000,000.

Screenshots

Screen Shot 2024-09-10 at 11 15 21 AM

Expected behavior

No skeleton loading or dead space is observed when the aforementioned criteria match.

Additional context

p1726566945164299-slack-CGGCLBN58

pierorocca commented 2 weeks ago

Noting here that BNPL payment methods have a max limit that are well below the $1M mark. e.g. Affirm is $30K USD and CAD.