title: Ajax/Woocommerce - JavaScript - How to get product price having product ID
body: <p>I need to run JavaScript while adding products to the basket. I have product id (in JavaScript/ajax) and I need to get price of the product (in JavaScript/ajax also). </p>
  
  <p>The script uses both variables - product id and product price.</p>
  
  <pre><code>&lt;script&gt;
      (function($){
          $('body').on( 'added_to_cart', function(e, fragments, cart_hash, this_button){
              var dddata = $(this_button).data('product_id');
              console.log(dddata);
          });
      })(jQuery); 
  &lt;/script&gt;
  </code></pre>