Automattic\WooCommerce\Blocks\BlockTypes

Wishlist::render_header_markup │ private │ WC 1.0

Wrap the inner-block content (heading + any future siblings) in a div. Unlike Saved for Later, no hasShownItems gating — the header is always shown when there's content for it. Returns an empty string when there's no content to wrap, so we don't emit an empty <div>.

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

Хуков нет.

Возвращает

string.

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

// private - только в коде основоного (родительского) класса
$result = $this->render_header_markup( $content ): string;
$content(строка) (обязательный)
Rendered inner-block content (typically the heading HTML).

Код Wishlist::render_header_markup() WC 11.2.1

private function render_header_markup( string $content ): string {
	if ( '' === $content ) {
		return '';
	}
	return '<div class="wc-block-wishlist__header">' . $content . '</div>';
}