Automattic\WooCommerce\Blocks\BlockTypes

CustomerAccount::render_sectionprivateWC 1.0

Render a dropdown section wrapping one or more menu items.

Method of the class: CustomerAccount{}

No Hooks.

Returns

String. Rendered section HTML.

Usage

// private - for code of main (parent) class only
$result = $this->render_section( $items );
$items(array) (required)
Associative array of endpoint => label pairs.

CustomerAccount::render_section() code WC 10.8.1

private function render_section( $items ) {
	$output = '<div class="wc-block-customer-account__dropdown-section">';
	foreach ( $items as $endpoint => $label ) {
		$output .= $this->render_menu_item( $endpoint, $label );
	}
	$output .= '</div>';
	return $output;
}