Automattic\WooCommerce\Vendor\GraphQL\Type\Definition

BooleanType::parseValuepublicWC 1.0

Method of the class: BooleanType{}

No Hooks.

Returns

null. Nothing (null).

Usage

$BooleanType = new BooleanType();
$BooleanType->parseValue( $value ): bool;
$value(required)
.

BooleanType::parseValue() code WC 10.9.4

public function parseValue($value): bool
{
    if (is_bool($value)) {
        return $value;
    }

    $notBoolean = Utils::printSafeJson($value);
    throw new Error("Boolean cannot represent a non boolean value: {$notBoolean}");
}