WordPress at a glance
function is not described

wc_maybe_define_constant() WC 3.0.0

Define a constant if it is not already defined.

No Hooks.

Return

null. Nothing.

Usage

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

Changelog

Since 3.0.0 Introduced.

Code of wc_maybe_define_constant() WC 5.3.0

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