Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails

WCEmailTemplateChangeSummary::clean_inner_text │ private static │ WC 1.0

Strip tags and collapse whitespace. Used as the basis for copy-change comparison — semantic content only, no markup-shape noise.

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

Хуков нет.

Возвращает

null. Ничего (null).

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

$result = WCEmailTemplateChangeSummary::clean_inner_text( $html ): string;
$html(строка) (обязательный)
Raw innerHTML string from a parsed block.

Код WCEmailTemplateChangeSummary::clean_inner_text() WC 11.2.2

private static function clean_inner_text( string $html ): string {
	$stripped  = wp_strip_all_tags( $html );
	$collapsed = preg_replace( '/\s+/', ' ', (string) $stripped );
	return trim( (string) $collapsed );
}