Automattic\WooCommerce\Blocks\BlockTypes
CustomerAccount::render_section
Render a dropdown section wrapping one or more menu items.
Метод класса: CustomerAccount{}
Хуков нет.
Возвращает
string. Rendered section HTML.
Использование
// private - только в коде основоного (родительского) класса $result = $this->render_section( $items );
- $items(массив) (обязательный)
- Associative array of endpoint => label pairs.
Код CustomerAccount::render_section() CustomerAccount::render section WC 11.3.0
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;
}