Enhance woocommerce_logger_log_message filter
This commit is contained in:
parent
1c40a28409
commit
7706b199c5
|
@ -139,11 +139,14 @@ class WC_Logger implements WC_Logger_Interface {
|
|||
}
|
||||
|
||||
if ( $this->should_handle( $level ) ) {
|
||||
$timestamp = current_time( 'timestamp', 1 );
|
||||
$message = apply_filters( 'woocommerce_logger_log_message', $message, $level, $context );
|
||||
$timestamp = time();
|
||||
|
||||
foreach ( $this->handlers as $handler ) {
|
||||
$handler->handle( $timestamp, $level, $message, $context );
|
||||
$message = apply_filters( 'woocommerce_logger_log_message', $message, $level, $context, $handler );
|
||||
|
||||
if ( null !== $message ) {
|
||||
$handler->handle( $timestamp, $level, $message, $context );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue