Tag Archive: woocommerce

How to change default woocommerce order status

May 24, 2015 6:14 am Published by Leave your thoughts

function set_default_order( $order_id ){ global $woocommerce; if ( !$order_id ) return; $order = new WC_Order( $order_id ); $ar = get_term_by( 'id', $termid, 'shop_order_status'); // pass here term id of the pending status. $order->update_status($ar->slug); } add_action( 'woocommerce_thankyou', 'set_default_order' ); Change default.....