Skip to content

Instantly share code, notes, and snippets.

@imran-khan1
Last active July 18, 2021 05:49
Show Gist options
  • Save imran-khan1/59ac6450b40d5e14bf3053bed5d44d7c to your computer and use it in GitHub Desktop.
Save imran-khan1/59ac6450b40d5e14bf3053bed5d44d7c to your computer and use it in GitHub Desktop.
<?php
/*
update checkout on billing postcode field blur
*/
function wc_field_blur_update_checkout(){?>
<script>
jQuery("#billing_postcode").blur(function(){
jQuery( 'body' ).trigger( 'update_checkout' );
});
</script>
<?php
}
add_action("wp_footer","wc_field_blur_update_checkout");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment