Merge pull request #20560 from shivapoudel/tweak/admin-bar-menu

Tweak - logged in user is also checked by is_admin_bar_showing
This commit is contained in:
Mike Jolley 2018-06-19 10:58:42 +01:00 committed by GitHub
commit e0ccc64571
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ class WC_Admin_Menus {
* @param WP_Admin_Bar $wp_admin_bar Admin bar instance.
*/
public function admin_bar_menus( $wp_admin_bar ) {
if ( ! is_admin() || ! is_user_logged_in() ) {
if ( ! is_admin() || ! is_admin_bar_showing() ) {
return;
}