Last active
June 21, 2017 12:20
-
-
Save bhavik-kiri/401f7b2f0ed2169ae0efd881cf2c2896 to your computer and use it in GitHub Desktop.
It will call the ajax when customer click on the quantity button
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(function( $ ) { | |
$( "form.checkout" ).on( "click", "input.qty", function( e ) { | |
var data = { | |
action: 'update_order_review', | |
security: wc_checkout_params.update_order_review_nonce, | |
post_data: $( 'form.checkout' ).serialize() | |
}; | |
jQuery.post( add_quantity.ajax_url, data, function( response ) | |
{ | |
$( 'body' ).trigger( 'update_checkout' ); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment