title: Change product price in Cart by custom field, Woocommerce
body: <p>I'm currently in a problem where I have to add option in Cart with checkbox (for each item in Cart) which will change item's price with one from custom attribute. </p>
  
  <p>This is an illustration of it (I have already created custom field, just need price updating function when button "Update cart" is clicked)</p>
  
  <p><a href="https://i.stack.imgur.com/8Ux5b.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8Ux5b.png" alt="enter image description here"></a></p>
  
  <p>Code for displaying checkbox for each item (/woocommerce/templates/cart/cart.php): </p>
  
  <pre><code>&lt;td class="product-url"&gt;
      &lt;?php
          $html = sprintf( '&lt;div class="lorem"&gt;&lt;input type="checkbox" name="cart[%s][lorem]" value="%s" size="4"  class="input-text url text" /&gt; Lorem price&lt;/div&gt;', $cart_item_key, esc_attr( $values['url'] ) );
          echo $html;
      ?&gt; 
  &lt;/td&gt;
  </code></pre>