title: Get the customer ID from an order ID in WooCommerce
body: <p>I want to get the "mycred" balance of a customer through the order while using WP ALL Export to export the customer balance based on orders to a spreadsheet. It's actually probably quite simple. I'm able to get the Order ID, but not the Customer ID</p>
  
  <p>Here is what I'm doing to test if I can get the customer ID:</p>
  
  <pre><code>function get_customeruserid($value)
  {
    global $woocommerce, $post;
  
    $order = new WC_Order($post-&gt;ID);
    $order_id = $order-&gt;get_order_number();
  
    $customer = new WC_Customer($post-&gt;ID);
    $user_id = $customer-&gt;get_ID();
  
    $value = $user_id;
    return $value;
  }
  </code></pre>
  
  <p>This returns a 0.</p>
  
  <p>However, I can get the order number easily enough by doing this:</p>
  
  <pre><code>function get_customerorderid($value)
  {
    global $woocommerce, $post;
  
    $order = new WC_Order($post-&gt;ID);
    $order_id = $order-&gt;get_order_number();
  
    $value = $order_id;
    return $value;
  }
  </code></pre>
  
  <p>This returns the customer's order number which is great, but only half the battle. I now want the Customer ID so I call call the mycred balance function to show their balance.</p>
  
  <p>Any ideas? I'm a newbie at php and probably very bad.</p>