WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Features\Navigation

Menu::get_parent_key() public WC 1.0

Get the parent key if one exists.

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

No Hooks.

Return

String|null. Nothing.

Usage

$result = Menu::get_parent_key( $callback );
$callback(string) (required)
Callback or URL.

Code of Menu::get_parent_key() WC 5.2.2

<?php
public static function get_parent_key( $callback ) {
	global $submenu;

	if ( ! $submenu ) {
		return null;
	}

	// This is already a parent item.
	if ( isset( $submenu[ $callback ] ) ) {
		return null;
	}

	foreach ( $submenu as $key => $menu ) {
		foreach ( $menu as $item ) {
			if ( $item[ self::CALLBACK ] === $callback ) {
				return $key;
			}
		}
	}

	return null;
}