woocommerce_calculate_item_totals_taxes

woocommerce_calculate_item_totals_taxes

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_calculate_item_totals_taxes') is found 1 times:

  • /includes/class-wc-cart-totals.php line 680
    				);
    			}
    
    			if ( $this->calculate_tax && $item->product->is_taxable() ) {
    				$total_taxes     = apply_filters( 'woocommerce_calculate_item_totals_taxes', WC_Tax::calc_tax( $item->total, $item->tax_rates, $item->price_includes_tax ), $item, $this );
    				$item->taxes     = $total_taxes;
    				$item->total_tax = array_sum( array_map( array( $this, 'round_line_tax' ), $item->taxes ) );
    
    				if ( $item->price_includes_tax ) {
    					// Use unrounded taxes so we can re-calculate from the orders screen accurately later.
    					$item->total = $item->total - array_sum( $item->taxes );