title: Get user total purchased items count in Woocmmmerce
body: <p>I'm trying to figure out a function which get current user total number of purchased items (not total sum but items) across as all placed orders. So far I have found this (which doesn't work) - but again this function should get total sum and not items. Been trying to edit it to work but no success so far.</p>
  
  <pre><code>public function get_customer_total_order() {
  $customer_orders = get_posts( array(
      'numberposts' =&gt; - 1,
      'meta_key'    =&gt; '_customer_user',
      'meta_value'  =&gt; get_current_user_id(),
      'post_type'   =&gt; array( 'shop_order' ),
      'post_status' =&gt; array( 'wc-completed' )
  ) );
  
  $total = 0;
  foreach ( $customer_orders as $customer_order ) {
      $order = wc_get_order( $customer_order );
      $total += $order-&gt;get_total();
  }
  
  return $total;
  }
  </code></pre>
  
  <p>Any ideas?</p>