Automattic\WooCommerce\Internal\ShopperLists

ShopperListRenderer::render_grid_wrapperpublic staticWC 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.

Method of the class: ShopperListRenderer{}

No Hooks.

Returns

String.

Usage

$result = ShopperListRenderer::render_grid_wrapper( $wrapper_attrs, $list_class, $inner, $before_list ): string;
$wrapper_attrs(array) (required)
.
$list_class(string) (required)
Class attribute for the inner <ul>.
$inner(string) (required)
Markup placed inside the <ul> (template + SSR rows + empty state).
$before_list(string)
Markup placed between <section> and <ul> (header, notices region).
Default: ''

ShopperListRenderer::render_grid_wrapper() code WC 10.9.1

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
	);
}