wc_maybe_define_constant()WC 3.0.0

Define a constant if it is not already defined.

No Hooks.

Return

null. Nothing (null).

Usage

wc_maybe_define_constant( $name, $value );
$name(string) (required)
Constant name.
$value(mixed) (required)
Value.

Changelog

Since 3.0.0 Introduced.

wc_maybe_define_constant() code WC 8.7.0

function wc_maybe_define_constant( $name, $value ) {
	if ( ! defined( $name ) ) {
		define( $name, $value );
	}
}