I have a WooCommerce issue about variable products. I want to add listener to "found_variation" event of variations form to get information about the current product variation.
I have tried this one but does not work:
jQuery.fn.wc_variation_form.bind( 'found_variation', function(event, variation) { console.log(variation); // logging to see the variation information $('#product-price').html(variation.price_html); // showing the variation price at custom html element } );
Any ideas?
I know this is an old post, but had the same issue. Eventually I got it working with the piece of code below:
$(document).on( 'found_variation', 'form.cart', function( event, variation ) {
/* Your code */
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With