Automattic\WooCommerce\Vendor\GraphQL\Error

Warning::warnpublic staticWC 1.0

Method of the class: Warning{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = Warning::warn( $errorMessage, $warningId, ?int $messageLevel ): void;
$errorMessage(string) (required)
.
$warningId(int) (required)
.
?int $messageLevel
.
Default: null

Warning::warn() code WC 10.9.1

public static function warn(string $errorMessage, int $warningId, ?int $messageLevel = null): void
{
    $messageLevel ??= \E_USER_WARNING;

    if (self::$warningHandler !== null) {
        (self::$warningHandler)($errorMessage, $warningId, $messageLevel);
    } elseif ((self::$enableWarnings & $warningId) > 0) {
        trigger_error($errorMessage, $messageLevel);
    }
}