Automattic\WooCommerce\EmailEditorVendor\Pelago\Emogrifier\HtmlProcessor

AbstractHtmlProcessor::getBodyElement │ private │ WC 1.0

Returns the BODY element.

This method assumes that there always is a BODY element.

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

Хуков нет.

Возвращает

\DOMElement.

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

// private - только в коде основоного (родительского) класса
$result = $this->getBodyElement(): \DOMElement;

Код AbstractHtmlProcessor::getBodyElement() WC 11.3.0

private function getBodyElement(): \DOMElement
{
    $node = $this->getDomDocument()->getElementsByTagName('body')->item(0);
    if (!$node instanceof \DOMElement) {
        throw new \RuntimeException('There is no body element.', 1617922607);
    }

    return $node;
}