WordPress at Your Fingertips
function is not described

WC_Cart::get_shipping_tax_amount() public WC 1.0

Get a tax amount.

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

No Hooks.

Return

float. amount

Usage

$WC_Cart = new WC_Cart();
$WC_Cart->get_shipping_tax_amount( $tax_rate_id );
$tax_rate_id(string) (required)
ID of the tax rate to get taxes for.

Code of WC_Cart::get_shipping_tax_amount() WC 5.7.1

public function get_shipping_tax_amount( $tax_rate_id ) {
	$taxes = $this->get_shipping_taxes();
	return isset( $taxes[ $tax_rate_id ] ) ? $taxes[ $tax_rate_id ] : 0;
}