WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

YoastSEO_Vendor\GuzzleHttp\Promise

RejectedPromise::then() public Yoast 1.0

{} Это метод класса: RejectedPromise{}

Хуков нет.

Возвращает

Null. Ничего.

Использование

$RejectedPromise = new RejectedPromise();
$RejectedPromise->then( $onFulfilled, $onRejected );

Код RejectedPromise::then() Yoast 15.6.2

<?php
public function then(callable $onFulfilled = null, callable $onRejected = null)
{
    // If there's no onRejected callback then just return self.
    if (!$onRejected) {
        return $this;
    }
    $queue = queue();
    $reason = $this->reason;
    $p = new \YoastSEO_Vendor\GuzzleHttp\Promise\Promise([$queue, 'run']);
    $queue->add(static function () use($p, $reason, $onRejected) {
        if ($p->getState() === self::PENDING) {
            try {
                // Return a resolved promise if onRejected does not throw.
                $p->resolve($onRejected($reason));
            } catch (\Throwable $e) {
                // onRejected threw, so return a rejected promise.
                $p->reject($e);
            } catch (\Exception $e) {
                // onRejected threw, so return a rejected promise.
                $p->reject($e);
            }
        }
    });
    return $p;
}