woocommerce_register_log_handlers filter-hookWC 3.0.0

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

WC_Logger::__construct()
woocommerce_register_log_handlers
woocommerce/includes/class-wc-logger.php 50
$handlers = apply_filters( 'woocommerce_register_log_handlers', array( $handler_instance ) );

Where the hook is used in WooCommerce

Usage not found.