after woocommerce_order_edit_status code example
Example: woocommerce update_status
$order = new WC_Order( $order_id );
$order->update_status('awaiting-shipment', 'order_note');
$order = new WC_Order( $order_id );
$order->update_status('awaiting-shipment', 'order_note');