Woocommerce BACS add bank account number on processing email
<p>I added an override function of the extended class of <code>WC_Gateway_BACS</code>. The function will update the status of the order from on-hold to processing. The problem is the email is missing the bank details now. Before I have the bank account number included on the email but after the customization, the email does not include it and I think it is because the order status is now processing. </p>

<p>Has anyone here did the same thing and come up with a solution? I included some images here of on-hold and processing emails. I like to add the account number to processing-email</p>

<pre><code>class WC_Gateway_BACS_custom extends WC_Gateway_BACS {
    /**
     * Process the payment and return the result
     *
     * @access public
     * @param int $order_id
     * @return array
     */
    function process_payment( $order_id ) {
        global $woocommerce;
        $order = new WC_Order( $order_id );
        // Mark as processing (or anything you want)
        $order-&gt;update_status('processing', __( 'Awaiting BACS payment', 'woocommerce' ));

        // Reduce stock levels
        $order-&gt;reduce_order_stock();

        // Remove cart
        $woocommerce-&gt;cart-&gt;empty_cart();

        // Return thankyou redirect
        return array(
            'result'  =&gt; 'success',
            'redirect'  =&gt; $this-&gt;get_return_url( $order )
        );
    }

    /**
     * Add content to the WC emails.
     *
     * @param WC_Order $order
     * @param bool $sent_to_admin
     * @param bool $plain_text
     */
    // public function email_instructions( $order, $sent_to_admin, $plain_text = false ) {

    //  if ( ! $sent_to_admin &amp;&amp; 'bacs' === $order-&gt;payment_method &amp;&amp; ($order-&gt;has_status( 'on-hold' ) || $order-&gt;has_status( 'processing' )) ) {
    //      if ( $this-&gt;instructions ) {
    //          echo wpautop( wptexturize( $this-&gt;instructions ) ) . PHP_EOL;
    //      }
    //      $this-&gt;bank_details( $order-&gt;id );
    //  }

    // }
}
</code></pre>

<p><a href="https://i.stack.imgur.com/NSGcx.jpg" rel="nofollow">on-hold email</a>
<a href="https://i.stack.imgur.com/UgLy6.jpg" rel="nofollow">processing email</a></p>