Automattic\WooCommerce\Blocks\BlockTypes

Wishlist::render_header_markupprivateWC 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>.

Method of the class: Wishlist{}

No Hooks.

Returns

String.

Usage

// private - for code of main (parent) class only
$result = $this->render_header_markup( $content ): string;
$content(string) (required)
Rendered inner-block content (typically the heading HTML).

Wishlist::render_header_markup() code WC 10.9.1

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