title: Get user custom meta data value and update it in WooCommerce orders
body: <p>In woocommerce, I'm trying to add additional code to a existing php code, that stores an value to an advanced customer field in the db. </p>
  
  <p>As you can see I calculate the value "Kontostandeintrag" as a result of an addition of different values and store this value in the post_meta in the Field "Kontostandeintrag". I do this for each order line.</p>
  
  <p>This works fine.</p>
  
  <p>As next step I would like to read the existing customer field "_kontostandaktuell" (for the customer of the order line)in the user_meta, add the actual value "Kontostandeintrag" to this field and update the field "_kontostandaktuell" again with the sum value of this fields. So after run through all order lines, I should have the sum value of all "Kontostandeintrag" values in the user_meta field "_kontostandaktuell" for each customer.</p>
  
  <p>Get user custom meta data value and update it in WooCommerce</p>
  
  <p>The existing code which I like to extend is:</p>
  
  <pre><code>add_filter('woe_get_order_value_Kontostandeintrag', function( $value, $order, $fieldname ) {
  
      $id = $order-&gt;get_id();
      $value =get_post_meta($id,"GS-Bargeldeinzahlung",true) +  $order-&gt;get_total() + get_post_meta($id,"GS-Mitgliedsbeitrag",true) + get_post_meta($id,"GS-Nachlass",true) + get_post_meta($id,"GS-Guthabenkonto",true);
  
      global $wpdb;
      $data = array("meta_value" =&gt;$value);
      $where = array("post_id"=&gt;$id,"meta_key" =&gt;"Kontostandeintrag");
      $wpdb-&gt;update( "wp_postmeta", $data, $where );
  
      return $value;
  
  },10,3);
  </code></pre>