woocommerce_cart_remove_taxes_zero_rate_id

woocommerce_cart_remove_taxes_zero_rate_id

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_cart_remove_taxes_zero_rate_id') is found 2 times:

  • /includes/class-wc-cart.php line 877
     
    		foreach ( $taxes as $key => $tax ) {
    			$code = WC_Tax::get_rate_code( $key );
    
    			if ( $code || apply_filters( 'woocommerce_cart_remove_taxes_zero_rate_id', 'zero-rated' ) === $key ) {
    				if ( ! isset( $tax_totals[ $code ] ) ) {
    					$tax_totals[ $code ]         = new stdClass();
    					$tax_totals[ $code ]->amount = 0;
    				}
    
    				$tax_totals[ $code ]->tax_rate_id = $key;
    
  • /includes/class-wc-checkout.php line 671
    			 * @since 3.0.0 or earlier
    			 *
    			 * @param string $tax_rate_id The ID of the zero rate tax.
    			 */
    			if ( $tax_rate_id && apply_filters( 'woocommerce_cart_remove_taxes_zero_rate_id', 'zero-rated' ) !== $tax_rate_id ) {
    				$item = new WC_Order_Item_Tax();
    				$item->set_props(
    					array(
    						'rate_id'            => $tax_rate_id,
    						'tax_total'          => $cart->get_tax_amount( $tax_rate_id ),
    						'shipping_tax_total' => $cart->get_shipping_tax_amount( $tax_rate_id ),