Automattic\WooCommerce\Utilities

StringUtil::is_null_or_empty()public staticWC 1.0

Check if a string is null or is empty.

Method of the class: StringUtil{}

No Hooks.

Return

true|false. True if the string is null or is empty.

Usage

$result = StringUtil::is_null_or_empty( ?string $value );
?string $value (required)
-

StringUtil::is_null_or_empty() code WC 9.4.2

public static function is_null_or_empty( ?string $value ) {
	return is_null( $value ) || '' === $value;
}