Force recalculate when update the checkout page
Force recalculation upon updating the checkout page.
add_action('woocommerce_checkout_update_order_review', function(){
if (function_exists('WC')) {
if (isset(WC()->cart) && WC()->cart != null) {
if (method_exists(WC()->cart, 'calculate_totals')) {
WC()->cart->calculate_totals();
WC()->cart->calculate_totals();
}
}
}
}, 1000);