title: WooCommerce - change order status with php code
body: <p>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 <code>echo $order-&gt;status;</code> works fine, $order_id is also correct. <code>$order-&gt;status = 'pending';</code> simply doesn't change anything, I do not know why. </p>
  
  <pre><code>$order = new WC_Order($order_id);
  $order-&gt;status = 'pending';
  </code></pre>
  
  <p>Could anyone help me with this?</p>