title: Order properties should not be accessed directly - WooCommerce 3.0
body: <p>I've just upgraded my local WooCommerce website to 3.0. Everything works perfectly as normal, but I've noticed with debugging turned on that I'm getting hundreds of the following notices:</p>
  
  <p><code>[05-Apr-2017 12:25:00 UTC] PHP Notice:  id was called &lt;strong&gt;incorrectly&lt;/strong&gt;. Order properties should not be accessed directly. Please see &lt;a href="https://codex.wordpress.org/Debugging_in_WordPress"&gt;Debugging in WordPress&lt;/a&gt; for more information. (This message was added in version 3.0.) in C:\xampp\htdocs\dev\wp-includes\functions.php on line 4137</code></p>
  
  <p>So it looks like WooCommerce are pulling back being able to directly call order data. One example this code is being triggered by is this function in my functions.php file:</p>
  
  <pre><code>function eden_woocommerce_order_number($original, $order)
  {
      return 'EDN-' . str_pad($order-&gt;id, 10, 0, STR_PAD_LEFT);
  }
  </code></pre>
  
  <p>This function simply adds "EDN" to the start of the order ID and pads it by 10 characters, but WooCommerce doesn't like how I'm calling <code>$order</code> - what would be the best way to rewrite such a function that 3.0 is happy with?</p>