woocommerce_order_get_subtotal
Использование
add_filter( 'woocommerce_order_get_subtotal', 'wp_kama_woocommerce_order_get_subtotal_filter', 10, 2 ); /** * Function for `woocommerce_order_get_subtotal` filter-hook. * * @param $condition * @param $that * * @return */ function wp_kama_woocommerce_order_get_subtotal_filter( $condition, $that ){ // filter... return $condition; }
- $condition
- -
- $that
- -
Где вызывается хук
woocommerce_order_get_subtotal
woocommerce/includes/abstracts/abstract-wc-order.php 508
return apply_filters( 'woocommerce_order_get_subtotal', (float) $subtotal, $this );