BACS info shown twice
-
When a client is ordering via BACS, the bank information is shown twice.
I added following script to my functions.php since I needed to set BACS on hold:// Remove and add filter remove_filter( 'woocommerce_payment_gateways', 'core_gateways' ); add_filter( 'woocommerce_payment_gateways', 'my_core_gateways' ); /** * core_gateways function modified. * * @access public * @param mixed $methods * @return void */ function my_core_gateways( $methods ) { $methods[] = 'WC_Gateway_BACS_custom'; return $methods; } 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 (that's what we want to change!) $order->update_status('payment-ou', __( 'Awaiting BACS payment', 'woocommerce' )); // Reduce stock levels $order->reduce_order_stock(); // Remove cart $woocommerce->cart->empty_cart(); // Return thankyou redirect return array( 'result' => 'success', 'redirect' => $this->get_return_url( $order ) ); } }What in this code causes the bank-information to be displayed (again)?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘BACS info shown twice’ is closed to new replies.