shshanker
9/17/2015 - 8:17 AM

From https://wordpress.org/support/topic/change-default-order-statuses-of-cash-and-cheque


<?php
add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
function custom_woocommerce_auto_complete_order( $order_id ) {
    global $woocommerce;
     if ( !$order_id )
        return;
    $order = new WC_Order( $order_id );
    $order->update_status( 'processing' );
}
?>