WordPress at Your Fingertips
function is not described

WC_Admin_Exporters::hide_from_menus() public WC 1.0

Hide menu items from view so the pages exist, but the menu items do not.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Admin_Exporters = new WC_Admin_Exporters();
$WC_Admin_Exporters->hide_from_menus();

Code of WC_Admin_Exporters::hide_from_menus() WC 5.9.0

public function hide_from_menus() {
	global $submenu;

	foreach ( $this->exporters as $id => $exporter ) {
		if ( isset( $submenu[ $exporter['menu'] ] ) ) {
			foreach ( $submenu[ $exporter['menu'] ] as $key => $menu ) {
				if ( $id === $menu[2] ) {
					unset( $submenu[ $exporter['menu'] ][ $key ] );
				}
			}
		}
	}
}