title: Woocommerce update price via update_post_meta
body: <p>I write a code that updates woocommerce prices via update_post_meta function.</p>
  
  <p>The prices change at the mysql but there are not changes on the site.
  I found that the price will update only if I'll change one of the variation to outofstock and then back to instock and save. (only to click on save variation).</p>
  
  <p>Can someone help me? why the price doesn't update from the database?</p>
  
  <p>Here is the update code</p>
  
  <pre><code>update_post_meta($id, '_price', $sale_price);
  
  update_post_meta($id, '_sale_price', $sale_price);
  
  update_post_meta($id, '_regular_price', $regular_price);
  
  $id= post_id of variation and parent (loop)
  </code></pre>
  
  <p>Thanks!</p>