refresh checkout on apply discount

add_action('woocommerce_applied_coupon', function (){
  add_action('woocommerce_review_order_before_order_total', function (){
  	?>
  	  <tr class="order-total">
		  <th></th>
		  <td>
			  <script type="text/javascript">
				jQuery( document ).ready(function() {
					jQuery( 'body' ).trigger( 'update_checkout' );
				}); 
			  </script>
		  </td>
  	  </tr>
  	<?php
  });
});

/* Fix css conflict: To hide zero value for coupon in cart */
function woo_discount_rules_apply_style_for_zero_price_coupon_method($style, $coupon){
	$style = str_replace("display: none", "display: none !important", $style);
	return $style;
}
add_filter('woo_discount_rules_apply_style_for_zero_price_coupon', 'woo_discount_rules_apply_style_for_zero_price_coupon_method', 10, 2);