WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features\Navigation

Menu::migrate_menu_items() public WC 1.0

Hides all WP admin menus items and adds screen IDs to check for new items.

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

No Hooks.

Return

null. Nothing.

Usage

$result = Menu::migrate_menu_items();

Code of Menu::migrate_menu_items() WC 5.3.0

<?php
public static function migrate_menu_items() {
	global $menu, $submenu;

	foreach ( $menu as $key => $menu_item ) {
		if ( self::has_callback( $menu_item ) ) {
			// Disable phpcs since we need to override submenu classes.
			// Note that `phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited` does not work to disable this check.
			// phpcs:disable
			$menu[ $key ][ self::CSS_CLASSES ] .= ' hide-if-js';
			// phps:enable
			continue;
		}

		// WordPress core menus make the parent item the same URL as the first child.
		$has_children = isset( $submenu[ $menu_item[ self::CALLBACK ] ] ) && isset( $submenu[ $menu_item[ self::CALLBACK ] ][0] );
		$first_child  = $has_children ? $submenu[ $menu_item[ self::CALLBACK ] ][0] : null;
		if ( 'woocommerce' !== $menu_item[2] && self::has_callback( $first_child ) ) {
			// Disable phpcs since we need to override submenu classes.
			// Note that `phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited` does not work to disable this check.
			// phpcs:disable
			$menu[ $key ][ self::CSS_CLASSES ] .= ' hide-if-js';
			// phps:enable
		}
	}

	// Remove excluded submenu items
	if ( isset( $submenu['woocommerce'] ) ) {
		foreach ( $submenu['woocommerce'] as $key => $submenu_item ) {
			if ( in_array( $submenu_item[ self::CALLBACK ], CoreMenu::get_excluded_items(), true ) ) {
				if ( isset( $submenu['woocommerce'][ $key ][ self::CSS_CLASSES ] ) ) {
					$submenu['woocommerce'][ $key ][ self::CSS_CLASSES ] .= ' hide-if-js';
				} else {
					$submenu['woocommerce'][ $key ][] = 'hide-if-js';
				}
			}
		}
	}

	foreach ( $submenu as $parent_key => $parent ) {
		foreach ( $parent as $key => $menu_item ) {
			if ( self::has_callback( $menu_item ) ) {
				// Disable phpcs since we need to override submenu classes.
				// Note that `phpcs:ignore WordPress.Variables.GlobalVariables.OverrideProhibited` does not work to disable this check.
				// phpcs:disable
				if ( ! isset( $menu_item[ self::SLUG ] ) ) {
					$submenu[ $parent_key ][ $key ][] = '';
				}
				if ( ! isset( $menu_item[ self::CSS_CLASSES ] ) ) {
					$submenu[ $parent_key ][ $key ][] .= ' hide-if-js';
				} else {
					$submenu[ $parent_key ][ $key ][ self::CSS_CLASSES ] .= ' hide-if-js';
				}
				// phps:enable
			}
		}
	}

	foreach ( array_keys( self::$callbacks ) as $callback ) {
		Screen::add_screen( $callback );
	}
}