WordPress at Your Fingertips
function is not described

WC_Cart::get_cart_tax() public WC 1.0

Gets the cart tax (after calculation).

{} It's a method of the class: WC_Cart{}

Hooks from the method
Return

String. formatted price

Usage

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

Code of WC_Cart::get_cart_tax() WC 5.6.0

public function get_cart_tax() {
	$cart_total_tax = wc_round_tax_total( $this->get_cart_contents_tax() + $this->get_shipping_tax() + $this->get_fee_tax() );

	return apply_filters( 'woocommerce_get_cart_tax', $cart_total_tax ? wc_price( $cart_total_tax ) : '' );
}