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').
Использование
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(строка)
- The ID of the zero rate tax.
Список изменений
С версии 3.0.0 | Введена. |
С версии 3.0.0 | or earlier |
Где вызывается хук
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 ) {