woocommerce_tax_round хук-фильтр . WC 1.0
Round to precision.
Filter example: to return rounding to .5 cents you'd use:
function euro_5cent_rounding( $in ) {
return round( $in / 5, 2 ) * 5;
} add_filter( 'woocommerce_tax_round', 'euro_5cent_rounding' );
Использование
add_filter( 'woocommerce_tax_round', 'filter_function_name_3469', 10, 2 ); function filter_function_name_3469( $in, $in ){ // filter... return $in; }
- $in(float/число)
- Value to round.
- $in
- -
Где вызывается хук
woocommerce_tax_round
woocommerce/includes/class-wc-tax.php 103
return apply_filters( 'woocommerce_tax_round', NumberUtil::round( $in, wc_get_rounding_precision() ), $in );