Automattic\WooCommerce\Vendor\GraphQL\Executor\Promise

PromiseAdapter::thenpublicWC 1.0

Accepts our Promise wrapper, extracts adopted promise out of it and executes actual then logic described in Promises/A+ specs. Then returns new wrapped instance of Automattic\WooCommerce\Vendor\GraphQL\Executor\Promise\Promise.

Method of the class: PromiseAdapter{}

No Hooks.

Returns

null. Nothing (null).

Usage

$PromiseAdapter = new PromiseAdapter();
$PromiseAdapter->then( $promise, ?callable $onFulfilled, ?callable $onRejected ): Promise;
$promise(Promise) (required)
.
?callable $onFulfilled
.
Default: null
?callable $onRejected
.
Default: null

PromiseAdapter::then() code WC 10.8.1

public function then(Promise $promise, ?callable $onFulfilled = null, ?callable $onRejected = null): Promise;