I have functionality that build on total based amount on cart page in WooCommerce. I get cart items total value with function:
WC()->cart->subtotal() - WC()->cart->get_discount_total();
Problem is:
If user enter coupon or other discount subtotal()
still give same result (without coupons inside).
I noticed if i refresh page, sum is working perfectly.
How I can make this change to be working on ajax cart refresh?