woocommerce_format_log_entry
Использование
add_filter( 'woocommerce_format_log_entry', 'wp_kama_woocommerce_format_log_entry_filter', 10, 2 ); /** * Function for `woocommerce_format_log_entry` filter-hook. * * @param $entry * @param $array * * @return */ function wp_kama_woocommerce_format_log_entry_filter( $entry, $array ){ // filter... return $entry; }
- $entry
- -
- $array
- -
Где вызывается хук
woocommerce_format_log_entry
woocommerce/includes/abstracts/abstract-wc-log-handler.php 46-55
return apply_filters( 'woocommerce_format_log_entry', $entry, array( 'timestamp' => $timestamp, 'level' => $level, 'message' => $message, 'context' => $context, ) );