woocommerce_calc_shipping_tax filter-hookWC 1.0

Calculate the shipping tax using a passed array of rates.

Usage

add_filter( 'woocommerce_calc_shipping_tax', 'wp_kama_woocommerce_calc_shipping_tax_filter', 10, 2 );

/**
 * Function for `woocommerce_calc_shipping_tax` filter-hook.
 * 
 * @param float $price Shipping cost.
 * @param       $rates 
 *
 * @return float
 */
function wp_kama_woocommerce_calc_shipping_tax_filter( $price, $rates ){

	// filter...
	return $price;
}
$price(float)
Shipping cost.
$rates
-

Where the hook is called

WC_Tax::calc_shipping_tax()
woocommerce_calc_shipping_tax
woocommerce/includes/class-wc-tax.php 86
return apply_filters( 'woocommerce_calc_shipping_tax', $taxes, $price, $rates );

Where the hook is used in WooCommerce

Usage not found.