WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features

Homescreen::update_link_structure() public WC 1.0

Update the WooCommerce menu structure to make our main dashboard/handler the top level link for 'WooCommerce'.

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

No Hooks.

Return

null. Nothing.

Usage

$Homescreen = new Homescreen();
$Homescreen->update_link_structure();

Code of Homescreen::update_link_structure() WC 5.2.2

<?php
public function update_link_structure() {
	global $submenu;
	// User does not have capabilites to see the submenu.
	if ( ! current_user_can( 'manage_woocommerce' ) || empty( $submenu['woocommerce'] ) ) {
		return;
	}

	$wc_admin_key = null;
	foreach ( $submenu['woocommerce'] as $submenu_key => $submenu_item ) {
		if ( self::MENU_SLUG === $submenu_item[2] ) {
			$wc_admin_key = $submenu_key;
			break;
		}
	}

	if ( ! $wc_admin_key ) {
		return;
	}

	$menu = $submenu['woocommerce'][ $wc_admin_key ];

	// Move menu item to top of array.
	unset( $submenu['woocommerce'][ $wc_admin_key ] );
	array_unshift( $submenu['woocommerce'], $menu );
}