Calc totals before checking cart items so coupon messages are output

Fixes #11177 @claudiosmweb
This commit is contained in:
Mike Jolley 2016-06-18 20:16:12 +01:00
parent 731c134d9e
commit 9f5dfe782d
1 changed files with 3 additions and 0 deletions

View File

@ -62,6 +62,9 @@ class WC_Shortcode_Cart {
// Update Shipping
if ( ! empty( $_POST['calc_shipping'] ) && wp_verify_nonce( $_POST['_wpnonce'], 'woocommerce-cart' ) ) {
self::calculate_shipping();
// Also calc totals before we check items so subtotals etc are up to date
WC()->cart->calculate_totals();
}
// Check cart items are valid