Automattic\WooCommerce\Vendor\GraphQL\Error

CoercionError::printInputPathpublicWC 1.0

Method of the class: CoercionError{}

No Hooks.

Returns

null. Nothing (null).

Usage

$CoercionError = new CoercionError();
$CoercionError->printInputPath(): ?string;

CoercionError::printInputPath() code WC 10.9.1

public function printInputPath(): ?string
{
    if ($this->inputPath === null) {
        return null;
    }

    $path = '';
    foreach ($this->inputPath as $segment) {
        $path .= is_int($segment)
            ? "[{$segment}]"
            : ".{$segment}";
    }

    return $path;
}