woocommerce_cart_remove_taxes_zero_rate_id
Controls the zero rate tax ID.
An order item tax will not be created for this ID (which by default is 'zero-rated').
Usage
add_filter( 'woocommerce_cart_remove_taxes_zero_rate_id', 'wp_kama_woocommerce_cart_remove_taxes_zero_rate_id_filter' ); /** * Function for `woocommerce_cart_remove_taxes_zero_rate_id` filter-hook. * * @param string $tax_rate_id The ID of the zero rate tax. * * @return string */ function wp_kama_woocommerce_cart_remove_taxes_zero_rate_id_filter( $tax_rate_id ){ // filter... return $tax_rate_id; }
- $tax_rate_id(string)
- The ID of the zero rate tax.
Changelog
Since 3.0.0 | Introduced. |
Since 3.0.0 | or earlier |
Where the hook is called
woocommerce_cart_remove_taxes_zero_rate_id
woocommerce_cart_remove_taxes_zero_rate_id
woocommerce/includes/class-wc-checkout.php 654
if ( $tax_rate_id && apply_filters( 'woocommerce_cart_remove_taxes_zero_rate_id', 'zero-rated' ) !== $tax_rate_id ) {
woocommerce/includes/class-wc-cart.php 877
if ( $code || apply_filters( 'woocommerce_cart_remove_taxes_zero_rate_id', 'zero-rated' ) === $key ) {