Automattic\WooCommerce\Vendor\GraphQL\Type\Definition
StringType::parseValue
Method of the class: StringType{}
No Hooks.
Returns
null. Nothing (null).
Usage
$StringType = new StringType(); $StringType->parseValue( $value ): string;
- $value(required)
- .
StringType::parseValue() StringType::parseValue code WC 10.9.1
public function parseValue($value): string
{
if (! is_string($value)) {
$notString = Utils::printSafeJson($value);
throw new Error("String cannot represent a non string value: {$notString}");
}
return $value;
}