Hide "Our Bank Details" heading when no bacs registered
The heading "Our Bank Details" is shown in emails even if there are not bacs registered. This fix prevent that.
This commit is contained in:
parent
58df3604f8
commit
8bbb0f2878
|
@ -271,11 +271,11 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
|
|||
// Get sortcode label in the $locale array and use appropriate one
|
||||
$sortcode = isset( $locale[ $country ]['sortcode']['label'] ) ? $locale[ $country ]['sortcode']['label'] : __( 'Sort Code', 'woocommerce' );
|
||||
|
||||
echo '<h2>' . __( 'Our Bank Details', 'woocommerce' ) . '</h2>' . PHP_EOL;
|
||||
|
||||
$bacs_accounts = apply_filters( 'woocommerce_bacs_accounts', $this->account_details );
|
||||
|
||||
if ( ! empty( $bacs_accounts ) ) {
|
||||
echo '<h2>' . __( 'Our Bank Details', 'woocommerce' ) . '</h2>' . PHP_EOL;
|
||||
|
||||
foreach ( $bacs_accounts as $bacs_account ) {
|
||||
|
||||
$bacs_account = (object) $bacs_account;
|
||||
|
|
Loading…
Reference in New Issue