woocommerce_register_log_handlers filter-hookWC 1.0

Constructor for the logger.

Usage

add_filter( 'woocommerce_register_log_handlers', 'wp_kama_woocommerce_register_log_handlers_filter' );

/**
 * Function for `woocommerce_register_log_handlers` filter-hook.
 * 
 * @param array $handlers Optional. Array of log handlers. If $handlers is not provided, the filter 'woocommerce_register_log_handlers' will be used to define the handlers. If $handlers is provided, the filter will not be applied and the handlers will be used directly.
 *
 * @return array
 */
function wp_kama_woocommerce_register_log_handlers_filter( $handlers ){

	// filter...
	return $handlers;
}
$handlers(array)
Optional. Array of log handlers. If $handlers is not provided, the filter 'woocommerce_register_log_handlers' will be used to define the handlers. If $handlers is provided, the filter will not be applied and the handlers will be used directly.

Where the hook is called

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

Where the hook is used in WooCommerce

woocommerce/includes/wc-core-functions.php 2100
add_filter( 'woocommerce_register_log_handlers', 'wc_register_default_log_handler' );