Automattic\WooCommerce\Internal\ShopperLists

ShopperListRenderer::render_grid_wrapper │ public static │ WC 1.0

Wrap $inner in the block's outer <section><ul>…</ul></section> grid scaffold. $wrapper_attrs are merged with the block's wrapper attributes via get_block_wrapper_attributes().

Trust contract: callers are responsible for ensuring $inner and $before_list contain only safe, escaped HTML — typically composed from the section helpers below, never from raw schema/request input.

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

Хуков нет.

Возвращает

string.

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

$result = ShopperListRenderer::render_grid_wrapper( $wrapper_attrs, $list_class, $inner, $before_list ): string;
$wrapper_attrs(array<string, mixed>) (обязательный)
Attributes for the outer <section>.
$list_class(строка) (обязательный)
Class attribute for the inner <ul>.
$inner(строка) (обязательный)
Markup placed inside the <ul> (template + SSR rows + empty state).
$before_list(строка)
Markup placed between <section> and <ul> (header, notices region).
По умолчанию: ''

Код ShopperListRenderer::render_grid_wrapper() WC 11.2.2

public static function render_grid_wrapper( array $wrapper_attrs, string $list_class, string $inner, string $before_list = '' ): string {
	return sprintf(
		'<section %1$s>%2$s<ul class="%3$s">%4$s</ul></section>',
		get_block_wrapper_attributes( $wrapper_attrs ),
		$before_list,
		esc_attr( $list_class ),
		$inner
	);
}