To accomplish this functionality you have to make a GET call by javascript, in this call you have to pass the ID of product. Below you can see an example for this action. HTML: <div class=”add_to_cart”> <a href=”#” data_id=”12″>Add to cart</a> </div> Where data_id is the product id. jQuery: jQuery(‘.add_to_cart’).on(‘click’, function(e){ var href… Continue reading Add to cart via AJAX Woocommerce without loop