woocommerce/woocommerce-gateway-stripe

Hide Multibanco on the checkout page when the Stripe account's country doesn't support it

a-danae opened this issue · 0 comments

Describe the bug

With the implementation of Multibanco using the Payment Methods API, #3204, this payment method is being displayed on the checkout pages, even though the connected Stripe account belongs to a country that doesn't support Multibanco.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Stripe account associated with a country that's not in this list, like India
  2. Connect your store to this account
  3. Select Euro as your store currency, at /wp-admin/admin.php?page=wc-settings&tab=general
  4. Go to the Payment Methods tab, at /wp-admin/admin.php?page=wc-settings&tab=checkout&section=stripe&panel=methods
  5. Enable Multibanco
  6. As a shopper, add a product to the cart and proceed to the checkout page
  7. Select Multibanco
  8. Click on Place Order
  9. Notice an error message is displayed saying that Multibanco isn't available for your account's country

Expected behavior
Multibanco must not be displayed on the checkout pages when it's not available for the connected account's country.

It had this behavior in the last release. Also, other country-limited payment methods follow this behavior, like OXXO and Boleto.