In WooCommerce any order placed with the BACS (direct bank transfer) is set to \"on-hold\"
.
How would one go about changing this automa
Try changing the code to this:
function rfvc_update_order_status( $order_status, $order_id ) {
$order = new WC_Order( $order_id );
if ( 'on-hold' == $order_status && 'on-hold' == $order->status ) {
$order->update_status('processing', 'order_note');
}
return $order_status;
}
The key change here is this:
$order->update_status('processing', 'order_note');
You can add order note too if you prefer.