Automattic\WooCommerce\Internal\EmailEditor

Logger::should_handleprivateWC 1.0

Checks if the log level should be handled.

Method of the class: Logger{}

Returns

true|false. Whether the log level should be handled.

Usage

// private - for code of main (parent) class only
$result = $this->should_handle( $level ): bool;
$level(string) (required)
The log level.

Logger::should_handle() code WC 10.3.6

private function should_handle( string $level ): bool {
	/**
	 * Controls the logging threshold for the email editor.
	 *
	 * @param string $threshold The log level threshold.
	 *
	 * @since 10.2.0
	 */
	$logging_threshold = apply_filters( 'woocommerce_email_editor_logging_threshold', WC_Log_Levels::WARNING );

	return WC_Log_Levels::get_level_severity( $logging_threshold ) <= WC_Log_Levels::get_level_severity( $level );
}