xxxxxxxxxx
$order = new WC_Order( $order_id );
$order->update_status('awaiting-shipment', 'order_note');
xxxxxxxxxx
$order = wc_get_order($order_id);
$order->set_status('pending');
$order->save();
xxxxxxxxxx
$order = new WC_Order($order_id);
$order->update_status('pending', 'order_note'); // order note is optional, if you want to add a note to order