I am trying to apply a discount to a carts total price, but I can only do it to the item base price and not the over all price. I Googled and came across this post in the w
Function get_cart_contents_total() gives the total of items in the cart, but after discounts. Depending on the tax settings you might have to add taxes. Something lie this:
$cart_total_price = wc_prices_include_tax() ? WC()->cart->get_cart_contents_total() + WC()->cart->get_cart_contents_tax() : WC()->cart->get_cart_contents_total();