Created
November 19, 2018 08:24
-
-
Save AshlinRejo/c4df051c5bb03f8ab40d0a5daff78cc0 to your computer and use it in GitHub Desktop.
Woo Discount Rules: Cart discount not applied in minicart until moves to cart page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('woocommerce_before_mini_cart', function (){ | |
if (!WC()->cart->is_empty()){ | |
WC()->cart->calculate_totals(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment