WC_Log_Levels::is_valid_level()
Validate a level string.
Method of the class: WC_Log_Levels{}
No Hooks.
Return
true|false
. True if $level is a valid level.
Usage
$result = WC_Log_Levels::is_valid_level( $level );
- $level(string) (required)
- Log level.
WC_Log_Levels::is_valid_level() WC Log Levels::is valid level code WC 9.4.2
public static function is_valid_level( $level ) { return is_string( $level ) && array_key_exists( strtolower( $level ), self::$level_to_severity ); }