Fixed WooCommerce submenu in multisites

reported in
https://wordpress.org/support/topic/error-message-in-multi-site-from-223

@mikejolley
This commit is contained in:
claudiosmweb 2014-09-16 19:03:50 -03:00
parent 81b12dec4f
commit 8719910441
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class WC_Admin_Menus {
unset( $submenu['woocommerce'][1] );
}
if ( current_user_can( 'manage_woocommerce' ) ) {
if ( isset( $submenu['woocommerce'] ) && current_user_can( 'manage_woocommerce' ) ) {
foreach ( $submenu['woocommerce'] as $key => $menu_item ) {
if ( 0 === strpos( $menu_item[0], _x( 'Orders', 'Admin menu name', 'woocommerce' ) ) ) {