Automattic\WooCommerce\EmailEditorVendor\Pelago\Emogrifier\HtmlProcessor

AbstractHtmlProcessor::removeHtmlTemplateElements │ private │ WC 1.0

Removes <template> elements from the given HTML, including any without an end tag, for which the remainder of the string is removed.

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

Хуков нет.

Возвращает

string.

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

// private - только в коде основоного (родительского) класса
$result = $this->removeHtmlTemplateElements( $html ): string;
$html(строка) (обязательный)
.

Код AbstractHtmlProcessor::removeHtmlTemplateElements() WC 11.3.0

private function removeHtmlTemplateElements(string $html): string
{
    return (new Preg())->throwExceptions(true)->replace(self::HTML_TEMPLATE_ELEMENT_PATTERN, '', $html);
}