wc_register_default_log_handler()WC 3.0

Deprecated from version 8.6.0. It is no longer supported and can be removed in future releases. It is recommended to replace this function with the same one.

Registers the default log handler.

No Hooks.

Return

Array.

Usage

wc_register_default_log_handler( $handlers );
$handlers(array)
Handlers.
Default: array()

Changelog

Since 3.0 Introduced.
Deprecated since 8.6.0

wc_register_default_log_handler() code WC 8.7.0

function wc_register_default_log_handler( $handlers = array() ) {
	wc_deprecated_function( 'wc_register_default_log_handler', '8.6.0' );

	$default_handler = wc_get_container()->get( Settings::class )->get_default_handler();

	array_push( $handlers, new $default_handler() );

	return $handlers;
}