WC_Cart::get_cart_total()publicWC 1.0

Gets the cart contents total (after calculation).

Method of the class: WC_Cart{}

Hooks from the method

Return

String. formatted price

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->get_cart_total();

WC_Cart::get_cart_total() code WC 8.7.0

public function get_cart_total() {
	return apply_filters( 'woocommerce_cart_contents_total', wc_price( wc_prices_include_tax() ? $this->get_cart_contents_total() + $this->get_cart_contents_tax() : $this->get_cart_contents_total() ) );
}