wc_register_default_log_handler( array $handlers )

Registers the default log handler.


Description Description


Parameters Parameters

$handlers

(Required) Handlers.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/wc-core-functions.php

function wc_register_default_log_handler( $handlers ) {
	$handler_class = Constants::get_constant( 'WC_LOG_HANDLER' );
	if ( ! class_exists( $handler_class ) ) {
		$handler_class = WC_Log_Handler_File::class;
	}

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

	return $handlers;
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.