woocommerce_logger_add_message
Add a log entry.
This is not the preferred method for adding log messages. Please use log() or any one of the level methods (debug(), info(), etc.). This method may be deprecated in the future.
Usage
add_filter( 'woocommerce_logger_add_message', 'wp_kama_woocommerce_logger_add_message_filter', 10, 2 ); /** * Function for `woocommerce_logger_add_message` filter-hook. * * @param string $handle File handle. * @param string $message Message to log. * * @return string */ function wp_kama_woocommerce_logger_add_message_filter( $handle, $message ){ // filter... return $handle; }
- $handle(string)
- File handle.
- $message(string)
- Message to log.
Where the hook is called
woocommerce_logger_add_message
woocommerce_logger_add_message
woocommerce/includes/class-wc-logger.php 137
$message = apply_filters( 'woocommerce_logger_add_message', $message, $handle );
woocommerce/includes/log-handlers/class-wc-log-handler-file.php 123
$message = apply_filters( 'woocommerce_logger_add_message', $message, $handle );