title: How update product attributes programmatically?
body: <p>I use following code to add attributes to a product:</p>
  <pre><code>foreach ($_attributes as $name =&gt; $value) {
          wp_set_object_terms($post_id, $value, $name, true);
          $product_attributes[$name] = array (
              'name' =&gt; $name, // set attribute name
              'value' =&gt; $value, // set attribute value
              'is_visible' =&gt; 0,
              'is_variation' =&gt; 1,
              'is_taxonomy' =&gt; 1
          );
      }
  update_post_meta($post_id, '_product_attributes', $product_attributes );
  </code></pre>
  <p>but it remove previous attributes I added in product edit in admin, like product brand or model.
  How can I update current product attributes without remove previous ones?</p>
  <p>Thanks to help me.</p>