WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Automattic\WooCommerce\Admin\Features\Navigation

CoreMenu::get_items() public WC 1.0

Get all menu items.

{} Это метод класса: CoreMenu{}

Хуков нет.

Возвращает

Массив.

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

$result = CoreMenu::get_items();

Код CoreMenu::get_items() WC 5.4.1

<?php
public static function get_items() {
	$order_items       = Menu::get_post_type_items( 'shop_order', array( 'parent' => 'woocommerce-orders' ) );
	$product_items     = Menu::get_post_type_items( 'product', array( 'parent' => 'woocommerce-products' ) );
	$product_tag_items = Menu::get_taxonomy_items(
		'product_tag',
		array(
			'parent' => 'woocommerce-products',
			'order'  => 30,
		)
	);
	$product_cat_items = Menu::get_taxonomy_items(
		'product_cat',
		array(
			'parent' => 'woocommerce-products',
			'order'  => 20,
		)
	);

	$coupon_items  = Menu::get_post_type_items( 'shop_coupon', array( 'parent' => 'woocommerce-marketing' ) );
	$setting_items = self::get_setting_items();
	$wca_items     = array();
	$wca_pages     = \Automattic\WooCommerce\Admin\PageController::get_instance()->get_pages();

	foreach ( $wca_pages as $page ) {
		if ( ! isset( $page['nav_args'] ) ) {
			continue;
		}

		$path = isset( $page['path'] ) ? $page['path'] : null;
		$item = array_merge(
			array(
				'id'         => $page['id'],
				'url'        => $path,
				'title'      => $page['title'][0],
				'capability' => isset( $page['capability'] ) ? $page['capability'] : 'manage_woocommerce',
			),
			$page['nav_args']
		);

		// Don't allow top-level items to be added to the primary menu.
		if ( ! isset( $item['parent'] ) || 'woocommerce' === $item['parent'] ) {
			$item['menuId'] = 'plugins';
		}

		$wca_items[] = $item;
	}

	$home_item = array();
	if ( defined( '\Automattic\WooCommerce\Admin\Features\AnalyticsDashboard::MENU_SLUG' ) ) {
		$home_item = array(
			'id'              => 'woocommerce-home',
			'title'           => __( 'Home', 'woocommerce' ),
			'url'             => \Automattic\WooCommerce\Admin\Features\AnalyticsDashboard::MENU_SLUG,
			'order'           => 0,
			'matchExpression' => 'page=wc-admin((?!path=).)*$',
		);
	}

	$customers_item = array();
	if ( class_exists( '\Automattic\WooCommerce\Admin\Features\Analytics' ) ) {
		$customers_item = array(
			'id'    => 'woocommerce-analytics-customers',
			'title' => __( 'Customers', 'woocommerce' ),
			'url'   => 'wc-admin&path=/customers',
			'order' => 50,
		);
	}

	return array_merge(
		array(
			$home_item,
			$customers_item,
			$order_items['all'],
			$order_items['new'],
			$product_items['all'],
			$product_cat_items['default'],
			$product_tag_items['default'],
			array(
				'id'              => 'woocommerce-product-attributes',
				'title'           => __( 'Attributes', 'woocommerce' ),
				'url'             => 'edit.php?post_type=product&page=product_attributes',
				'capability'      => 'manage_product_terms',
				'order'           => 40,
				'parent'          => 'woocommerce-products',
				'matchExpression' => 'edit.php(?=.*[?|&]page=product_attributes(&|$|#))|edit-tags.php(?=.*[?|&]taxonomy=pa_)(?=.*[?|&]post_type=product(&|$|#))',
			),
			array_merge( $product_items['new'], array( 'order' => 50 ) ),
			$coupon_items['default'],
			// Marketplace category.
			array(
				'title'      => __( 'Marketplace', 'woocommerce' ),
				'capability' => 'manage_woocommerce',
				'id'         => 'woocommerce-marketplace',
				'url'        => 'wc-addons',
				'menuId'     => 'secondary',
				'order'      => 10,
			),
		),
		// Tools category.
		self::get_tool_items(),
		// WooCommerce Admin items.
		$wca_items,
		// Settings category.
		$setting_items,
		// Legacy report items.
		self::get_legacy_report_items()
	);
}