This commit is contained in:
Mike Jolley 2012-07-31 15:04:05 +01:00
parent eb532c342c
commit bb892727f3
2 changed files with 7 additions and 4 deletions

View File

@ -69,8 +69,10 @@ function woocommerce_admin_menu_highlight() {
}
}
if ( isset( $submenu['woocommerce'] ) ) {
$submenu['woocommerce'][0] = $submenu['woocommerce'][2];
unset( $submenu['woocommerce'][2] );
}
// Sort out Orders menu when on the top level
if ( ! current_user_can( 'manage_woocommerce' ) && current_user_can( 'manage_woocommerce_orders' ) ) {

View File

@ -199,7 +199,8 @@ add_action( 'show_user_profile', 'woocommerce_customer_meta_fields' );
add_action( 'edit_user_profile', 'woocommerce_customer_meta_fields' );
function woocommerce_customer_meta_fields( $user ) {
if (!current_user_can('manage_woocommerce')) return $columns;
if ( ! current_user_can( 'manage_woocommerce' ) )
return;
$show_fields = woocommerce_get_customer_meta_fields();