Sometime you want to update the checkout total based on a specific field. e.g how to update WooCommerce checkout total with postcode field.
Enter the value in billing_postcode field and as you blur. The jQuery( ‘body’ ).trigger( ‘update_checkout’ ); will be triggered and the checkout total will be updated.
Use the following code snippet within theme functions.php