Automattic\WooCommerce\Internal\Admin\Logging

Settings::get_level_thresholdpublicWC 1.0

Determine the current value of the level_threshold setting.

Method of the class: Settings{}

No Hooks.

Returns

String.

Usage

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

Settings::get_level_threshold() code WC 10.8.1

public function get_level_threshold(): string {
	$key = self::PREFIX . 'level_threshold';

	$threshold = Constants::get_constant( 'WC_LOG_THRESHOLD' );

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

	if ( ! WC_Log_Levels::is_valid_level( $threshold ) ) {
		$threshold = self::DEFAULTS['level_threshold'];
	}

	return $threshold;
}