Automattic\WooCommerce\EmailEditorVendor\Pelago\Emogrifier\HtmlProcessor

AbstractHtmlProcessor::removeHtmlComments │ private │ WC 1.0

Removes comments from the given HTML, including any which are unterminated, for which the remainder of the string is removed.

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

Хуков нет.

Возвращает

string.

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

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

Код AbstractHtmlProcessor::removeHtmlComments() WC 11.3.0

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