Automattic\WooCommerce\Admin\Features\Navigation

Menu::get_category_items()public staticWC 1.0

Get registered menu items.

{} It's a method of the class: Menu{}

Return

Array.

Usage

$result = Menu::get_category_items( $category );
$category (required)
-

Code of Menu::get_category_items() WC 7.1.0

public static function get_category_items( $category ) {
	if ( ! isset( self::$categories[ $category ] ) ) {
		return array();
	}

	$menu_item_ids = self::$categories[ $category ];

	$category_menu_items = array();
	foreach ( $menu_item_ids as $id ) {
		if ( isset( self::$menu_items[ $id ] ) ) {
			$category_menu_items[] = self::$menu_items[ $id ];
		}
	}

	return apply_filters( 'woocommerce_navigation_menu_category_items', $category_menu_items );
}