WordPress at Your Fingertips
function is not described

WC_Logger::should_handle() protected WC 1.0

Determine whether to handle or ignore log.

{} It's a method of the class: WC_Logger{}

No Hooks.

Return

true|false. True if the log should be handled.

Usage

// protected - for code of main (parent) or child class
$result = $this->should_handle( $level );
$level(string) (required)
emergency|alert|critical|error|warning|notice|info|debug.

Code of WC_Logger::should_handle() WC 5.9.0

protected function should_handle( $level ) {
	if ( null === $this->threshold ) {
		return true;
	}
	return $this->threshold <= WC_Log_Levels::get_level_severity( $level );
}