Automattic\WooCommerce\Vendor\GraphQL\Executor\Promise\Adapter

AmpFutureAdapter::unwrapResultprotected staticWC 1.0

Method of the class: AmpFutureAdapter{}

No Hooks.

Returns

Mixed.

Usage

$result = AmpFutureAdapter::unwrapResult( $value );
$value(mixed) (required)
.

AmpFutureAdapter::unwrapResult() code WC 10.9.1

protected static function unwrapResult($value)
{
    if ($value instanceof Promise) {
        $value = $value->adoptedPromise;
    }

    if ($value instanceof Future) {
        return $value->await();
    }

    return $value;
}