Automattic\WooCommerce\Internal\Admin\Logging

Settings::get_default_handler()publicWC 1.0

Determine the current value of the default_handler setting.

Method of the class: Settings{}

No Hooks.

Return

String.

Usage

$Settings = new Settings();
$Settings->get_default_handler(): string;

Settings::get_default_handler() code WC 9.3.3

public function get_default_handler(): string {
	$key = self::PREFIX . 'default_handler';

	$handler = Constants::get_constant( 'WC_LOG_HANDLER' );

	if ( is_null( $handler ) ) {
		$handler = WC_Admin_Settings::get_option( $key );
	}

	if ( ! class_exists( $handler ) || ! is_a( $handler, 'WC_Log_Handler_Interface', true ) ) {
		$handler = self::DEFAULTS['default_handler'];
	}

	return $handler;
}