When WooCommerce “manual bank transfer” payment gateway is enabled and you add more than one bank account, WooCommerce outputs every bank account everywhere: on the thank you page, and in the order confirmation emails. That’s fine for simple setups, but not ideal if your store needs to show different bank details depending on the order properties.
On the Checkout Summit website, for example, I use a EUR/USD currency switcher powered by WooPayments so attendees can purchase tickets and sponsorships in their preferred currency. I also have Bank Transfer (“BACS”) enabled as a secondary payment method, and I’ve added two bank accounts in the settings: one for EUR and one for USD.
This creates a practical requirement: customers checking out in EUR should only see the EUR bank account, while those paying in USD should only see the USD bank account. Displaying both would be confusing and unprofessional.
To fix this, I worked on a small snippet that conditionally filters the BACS instructions. It checks the order currency (or any other property) and only returns the matching bank account.
Continue reading WooCommerce: Show or Hide Bank Accounts Based On Order