Automattic\WooCommerce\Internal\Utilities

FilesystemUtil::constant_exists()private staticWC 1.0

Check if a constant exists and is not null.

Method of the class: FilesystemUtil{}

No Hooks.

Return

true|false. True if the constant exists and its value is not null.

Usage

$result = FilesystemUtil::constant_exists( $name ): bool;
$name(string) (required)
Constant name.

FilesystemUtil::constant_exists() code WC 9.6.0

private static function constant_exists( string $name ): bool {
	return Constants::is_defined( $name ) && ! is_null( Constants::get_constant( $name ) );
}