Skip to content

Instantly share code, notes, and snippets.

@getmanzooronline
Last active April 10, 2020 08:02
Show Gist options
  • Save getmanzooronline/c3ee451bf8d80f00f113bd5f1c183419 to your computer and use it in GitHub Desktop.
Save getmanzooronline/c3ee451bf8d80f00f113bd5f1c183419 to your computer and use it in GitHub Desktop.
Woocommerce: Refresh place order section while changing the payment gateway
jQuery(function($){
//To display the Custom Payment Button.
$('form.checkout').on( 'change', 'input[name^="payment_method"]', function() {
var t = { updateTimer: !1, dirtyInput: !1,
reset_update_checkout_timer: function() {
clearTimeout(t.updateTimer)
}, trigger_update_checkout: function() {
t.reset_update_checkout_timer(), t.dirtyInput = !1,
$(document.body).trigger("update_checkout")
}
};
t.trigger_update_checkout();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment