Automattic\WooCommerce\Internal\Admin\Logging

Settings::logging_is_enabled()publicWC 1.0

Determine the current value of the logging_enabled setting.

Method of the class: Settings{}

No Hooks.

Return

true|false.

Usage

$Settings = new Settings();
$Settings->logging_is_enabled(): bool;

Settings::logging_is_enabled() code WC 9.3.3

public function logging_is_enabled(): bool {
	$key = self::PREFIX . 'logging_enabled';

	$enabled = WC_Admin_Settings::get_option( $key, self::DEFAULTS['logging_enabled'] );
	$enabled = filter_var( $enabled, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE );

	if ( is_null( $enabled ) ) {
		$enabled = self::DEFAULTS['logging_enabled'];
	}

	return $enabled;
}