Automattic\WooCommerce\Vendor\Pelago\Emogrifier\HtmlProcessor

AbstractHtmlProcessor::getXPath │ protected │ WC 1.0

Метод класса: AbstractHtmlProcessor{}

Хуков нет.

Возвращает

\DOMXPath.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->getXPath(): \DOMXPath;

Код AbstractHtmlProcessor::getXPath() WC 11.2.1

protected function getXPath(): \DOMXPath
{
    if (!$this->xPath instanceof \DOMXPath) {
        $message = self::class . '::setDomDocument() has not yet been called on ' . static::class;
        throw new \UnexpectedValueException($message, 1617819086);
    }

    return $this->xPath;
}