woocommerce_register_log_handlers
Filter the list of log handler class instances that will run whenever a log entry is added.
Usage
add_filter( 'woocommerce_register_log_handlers', 'wp_kama_woocommerce_register_log_handlers_filter' );
/**
* Function for `woocommerce_register_log_handlers` filter-hook.
*
* @param WC_Log_Handler_Interface[] $array
*
* @return WC_Log_Handler_Interface[]
*/
function wp_kama_woocommerce_register_log_handlers_filter( $array ){
// filter...
return $array;
}
- $array(WC_Log_Handler_Interface[])
- -
Changelog
| Since 3.0.0 | Introduced. |
Where the hook is called
woocommerce_register_log_handlers
woocommerce/includes/class-wc-logger.php 67
$handlers = apply_filters( 'woocommerce_register_log_handlers', array( $handler_instance ) );
Where the hook is used in WooCommerce
woocommerce/includes/class-woocommerce.php 334
add_filter( 'woocommerce_register_log_handlers', array( $this, 'register_remote_log_handler' ) );