woocommerce_order_amount_line_tax
Get line tax - useful for gateways.
Использование
add_filter( 'woocommerce_order_amount_line_tax', 'wp_kama_woocommerce_order_amount_line_tax_filter', 10, 2 ); /** * Function for `woocommerce_order_amount_line_tax` filter-hook. * * @param $item * @param $that * * @return */ function wp_kama_woocommerce_order_amount_line_tax_filter( $item, $that ){ // filter... return $item; }
- $item
- -
- $that
- -
Где вызывается хук
woocommerce_order_amount_line_tax
woocommerce/includes/abstracts/abstract-wc-order.php 2093
return apply_filters( 'woocommerce_order_amount_line_tax', is_callable( array( $item, 'get_total_tax' ) ) ? wc_round_tax_total( $item->get_total_tax() ) : 0, $item, $this );