I am trying to change order status in WooCommerce, but I encountered no luck so far. $order instance is created successfully (I know it because echo $order->status;
Working with woocommerce v4.4, other answers were not working for me. I had to do it this way,
$order = wc_get_order($order_id);
$order->set_status('pending');
$order->save();
Note: Woocommerce internally adds wc prefix, you will see it if you view in the database. We do not need to explicitly add it.