am trying to do somthing like : Woocommerce update checkout ajax! am building a multistep form for my client where the customer is adding a product in the cart using ajax . I need to update the checkout when a product is added into the cart . I tried to do an onclick function so when the user add the product in the cart the checkout step update without refreshing the page :
jQuery('#test').on('click',function(){
$( document.body ).trigger( 'update_checkout' );
})
but its not working and i feel like am missing somthing obvious …. Any tips ? 🙂
2
Answers
Your code is correct you have to replace $ with jQuery
The code is tested everything is working fine.
This event fire after checkout update