I'm trying to display total cart value (including VAT) in the header of my site. However - if I try to use cart->get_cart_total() I get the price excluding VAT. If I try to use cart->get_totals() I get a value of 0 until I visit the cart page - then it shows the correct value (even if I surf to other pages).
Ok, so I tried to run cart->calculate_totals() before fetching the cart->get_totals() but it seems to reset the value... It still works fine on the cart page though.
Could someone please help me here? Thanks
I managed to get the desired result by using cart->get_cart_subtotal().
Now I just want to remove the "(incl. tax)" that gets amended to the result.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With