The actual slug for the WooCommerce menu item is ‘woocommerce’.
So if you replace:
'edit.php?post_type=shop_order', // WooCommerce
with:
'woocommerce', // WooCommerce
the above code will work.
I found a handy function that will display all the items in the menu array at How to remove admin menu pages inserted by plugins?.
Here is the function (from the above link) that I use when reordering menu items:
function my_debug_admin_menu() {
echo '<pre style="margin-left:200px;">' . print_r( $GLOBALS[ 'menu' ], TRUE) . '</pre>';
}
add_action( 'admin_init', 'my_debug_admin_menu' );
Related Posts:
- Add separator to admin submenu
- Make Theme automatically choose default nav menu
- Move admin menu at the end
- Sort wp_nav_menu() by menu order
- SlideDeck 2, make back-end visible for admins only
- Changing the Order of Admin Menu Sections?
- Adding an Arbitrary Link to the Admin Menu?
- Does Extending Multiple Nav_Menu_Walkers Allow Nested Menus?
- wp_nav_menu remove class and id from li
- On which hook should I be calling register_nav_menu(s)?
- Renaming a WordPress Admin Menu
- Any official way to create an admin theme?
- Show child pages by menu order using Superfish Dropdown menu?
- How do I fix this error: Warning: invalid argument supplied for foreach()?
- How to add menu to Dashboard that can be viewed by all users
- Menu is not visible in appearance
- One site, 2 distinct sections: two different top nav menus?
- How can I disable parent menu item links?
- Organizing by super-categories (or nested categories)?
- Nav menu items disappearing (but not immediately)
- Hide pages depending on role
- How to display custom post meta in the appearance->menus page
- wp_nav_menu custom walker – child items
- How can I get an array/list of all current WordPress Admin Menu items?
- wp_nav_menu doesn’t generate parent/ancestor classes
- how to only add a top-level admin menu without it creating a sub-level-menu
- Add static item to wp_nav_menu
- How to get wordpress nav menu outside of wordpress system?
- Add nav menu CSS class to body
- Change HTML structure for custom menu in sidebar
- Using Shortcodes in WP-Menus in WP 3.1 (via nav_menu_objects)?
- Remove Metabox from Menus screen
- Current menu item
- Disabling ‘posts’ in Appearance > Menus
- Hiding Admin Page While Keeping Menu Expanded
- remove everything from wp_nav_menu
- How to add wechat (weixin) link to navigation menu?
- Admin only menu/page
- Get admin menu link
- Best way to customise wp_nav_menu [duplicate]
- Adding all sub-pages to the menu manager
- Hook for number of items in Appearance > Menus > CustomPostType > View All [duplicate]
- Filter for Admin Nav Menus Drop Down
- How to add custom classes to more than one separate menu’s a link in wordpress?
- How do I separate link levels in a custom menu walker?
- Limit the menu child levels under “admin > appearance > menus”
- Hard-coding custom menu elements for menu manager
- Ad custom admin page like WordPress customizer [closed]
- Admin menu structure
- Appearance Menus Screen – menu item drop down menu not functioning
- Adding an admin menu page showing the link twice – how to solve this?
- pull non-wp site into content area of wordpress -or- pull wp header into non wp site?
- Help with walker for nav
- Create custom page and add it in nav menu by code
- Using my WordPress menu on another platform
- Remove a menu sub-item
- How to add html attributes to the “ul” html tag with “wp_nav_menu” function?
- Using _s theme, menu changes do not affect header menu
- Limit User Iinterface for Admin?
- Admin-ajax.php 500 error when Add to menu is clicked in admin
- Make pages visible to only logged in members
- Can I have custom post types in “Add menu items” on in the Admin > Appearance > Menu
- Get custom classes in WordPress Navigation Menu
- Where is the order of a menu saved in the database
- Add Labels to Admin Menu ( How To )
- How can I make a menu link visible only to admins (without plugins)?
- Replace the slug of parent pages with # [closed]
- Stop Expansion of Top Level Menu in the WordPress Admin Sidebar
- Adding top level items in the admin menu that link to a post
- Orderby menu_order not working; menu is sorted on publish date
- How to get submenu of admin menu?
- How to undo the last changes to a custom menu?
- Strange menu behaviour wordpress admin [duplicate]
- Adding CSS-class to WordPress Menu in backend
- Menu deletes all items and position – wordpress bug?
- Plugins & Setting Menu Items Removed From Admin Panel
- Filter to hook into menu items and add a custom attribute
- I can’t add more pages to menu – menu delete pages
- Responsive menu on genesis theme [closed]
- add_menu_page does not render the expected result
- Admin Menu Hack (Left side in Dashboard)
- Lost admin “manage_link” capability WordPress. No “Links” menu item in admin menu
- How to open a lightbox form from a navigation menu item
- How to create this kind of sub-menu in new line?
- Hide custom menu when when no menu selected
- How to list menu-item- ids in order for wp_nav_menu
- Admin menu in different languages
- Need to remove the admin menu item from a be theme in wordpress
- Add category label for appearance > menus items
- Removing wp admin menu item on top bar of admin backend
- How can I order these pages in this navigation bar on this old wordpress theme?
- how to hard link to the posts page?
- Add a data attribute to list item element in menu
- Links in new menu don’t work
- wp_is_mobile() inside js
- Accidental reverse order of menu items in one menu
- how to display wordpress navbar with top menu outside wordpress system
- Appearance > Menus
- Customizing label/title output of admin nav_menu selecter
- Is It Possible To A Link To The Homepage From The Admin Sidebar?