Hide Multibanco on the checkout page when the Stripe account's country doesn't support it
a-danae opened this issue · 0 comments
a-danae commented
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:
- Create a Stripe account associated with a country that's not in this list, like India
- Connect your store to this account
- Select Euro as your store currency, at
/wp-admin/admin.php?page=wc-settings&tab=general
- Go to the Payment Methods tab, at
/wp-admin/admin.php?page=wc-settings&tab=checkout§ion=stripe&panel=methods
- Enable Multibanco
- As a shopper, add a product to the cart and proceed to the checkout page
- Select Multibanco
- Click on Place Order
- Notice an error message is displayed saying that Multibanco isn't available for your account's country
![](https://private-user-images.githubusercontent.com/41606954/343858236-ae23c40e-1e8f-4266-b396-2c9622a5ab79.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1MTk2MjMsIm5iZiI6MTcyNDUxOTMyMywicGF0aCI6Ii80MTYwNjk1NC8zNDM4NTgyMzYtYWUyM2M0MGUtMWU4Zi00MjY2LWIzOTYtMmM5NjIyYTVhYjc5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDE3MDg0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRmYWM4OWY0YTNmMjVhMDRiMjQxZGZlMGYyMjM0YzU5MTEwMDlhNmRhOWMzZTVlODYyYTI0YThiMWQzOTgyYjgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.OVXIqXcEd5CGDUASX8TUBz5VP7zkXGM5Vb_LH4dfr1k)
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.