Automattic\WooCommerce\Vendor\GraphQL\Executor\Promise\Adapter
SyncPromiseAdapter::then
Method of the class: SyncPromiseAdapter{}
No Hooks.
Returns
null. Nothing (null).
Usage
$SyncPromiseAdapter = new SyncPromiseAdapter(); $SyncPromiseAdapter->then( $promise, ?callable $onFulfilled, ?callable $onRejected ): Promise;
- $promise(Promise) (required)
- .
- ?callable $onFulfilled
- .
Default:null - ?callable $onRejected
- .
Default:null
SyncPromiseAdapter::then() SyncPromiseAdapter::then code WC 10.9.1
public function then(Promise $promise, ?callable $onFulfilled = null, ?callable $onRejected = null): Promise
{
$syncPromise = $promise->adoptedPromise;
assert($syncPromise instanceof SyncPromise);
return new Promise($syncPromise->then($onFulfilled, $onRejected), $this);
}