woocommerce_price_inc_tax_amount

woocommerce_price_inc_tax_amount

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

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_price_inc_tax_amount') is found 2 times:

  • /includes/class-wc-tax.php line 134
     
    		$non_compound_price = $price;
    
    		foreach ( $compound_rates as $key => $compound_rate ) {
    			$tax_amount         = apply_filters( 'woocommerce_price_inc_tax_amount', $non_compound_price - ( $non_compound_price / ( 1 + ( $compound_rate / 100 ) ) ), $key, $rates[ $key ], $price );
    			$taxes[ $key ]     += $tax_amount;
    			$non_compound_price = $non_compound_price - $tax_amount;
    		}
    
    		// Regular taxes.
    		$regular_tax_rate = 1 + ( array_sum( $regular_rates ) / 100 );
    
  • /includes/class-wc-tax.php line 145
     
    		foreach ( $regular_rates as $key => $regular_rate ) {
    			$the_rate       = ( $regular_rate / 100 ) / $regular_tax_rate;
    			$net_price      = $price - ( $the_rate * $non_compound_price );
    			$tax_amount     = apply_filters( 'woocommerce_price_inc_tax_amount', $price - $net_price, $key, $rates[ $key ], $price );
    			$taxes[ $key ] += $tax_amount;
    		}
    
    		/**
    		 * Round all taxes to precision (4DP) before passing them back. Note, this is not the same rounding
    		 * as in the cart calculation class which, depending on settings, will round to 2DP when calculating