WordPress at Your Fingertips
function is not described

WC_Tax::calc_shipping_tax() public WC 1.0

Calculate the shipping tax using a passed array of rates.

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

Hooks from the method

Return

Array.

Usage

$result = WC_Tax::calc_shipping_tax( $price, $rates );
$price(float) (required)
Shipping cost.
$rates(array) (required)
Taxation Rate.

Code of WC_Tax::calc_shipping_tax() WC 5.9.0

public static function calc_shipping_tax( $price, $rates ) {
	$taxes = self::calc_exclusive_tax( $price, $rates );
	return apply_filters( 'woocommerce_calc_shipping_tax', $taxes, $price, $rates );
}