woocommerce_bacs_account_fields

The WooCommerce woocommerce bacs account fields hook.

Description

apply_filters( 'woocommerce_bacs_account_fields', (callback) $array, (unknown) $order_id ); 

Parameters (2)

0. $array — Optional. (callback) => array( 'bank_name' => array( 'label' => __( 'Bank', 'woocommerce' ), 'value' => $bacs_account->bank_name, ), 'account_number' => array( 'label' => __( 'Account number', 'woocommerce' ), 'value' => $bacs_account->account_number, ), 'sort_code' => array( 'label' => $sortcode, 'value' => $bacs_account->sort_code, ), 'iban' => array( 'label' => __( 'IBAN', 'woocommerce' ), 'value' => $bacs_account->iban, ), 'bic' => array( 'label' => __( 'BIC', 'woocommerce' ), 'value' => $bacs_account->bic, ), )
The array.
1. $order_id (unknown)
The order id.

Usage

To run the hook, copy the example below.
  1. $array = apply_filters( 'woocommerce_bacs_account_fields', $array, $order_id ); 
  2.  
  3. if ( !empty( $array ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_bacs_account_fields callback 
  2. function filter_woocommerce_bacs_account_fields( $array, $order_id ) { 
  3. // make filter magic happen here... 
  4. return $array
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_bacs_account_fields', 'filter_woocommerce_bacs_account_fields', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_bacs_account_fields', 'filter_woocommerce_bacs_account_fields', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/gateways/bacs/class-wc-gateway-bacs.php  
  1. $account_fields = apply_filters( 'woocommerce_bacs_account_fields', array(