Tweak - logged in user is also checked by is_admin_bar_showing
This commit is contained in:
parent
dc20237f40
commit
dcc2e595f2
|
@ -340,7 +340,7 @@ class WC_Admin_Menus {
|
||||||
* @param WP_Admin_Bar $wp_admin_bar Admin bar instance.
|
* @param WP_Admin_Bar $wp_admin_bar Admin bar instance.
|
||||||
*/
|
*/
|
||||||
public function admin_bar_menus( $wp_admin_bar ) {
|
public function admin_bar_menus( $wp_admin_bar ) {
|
||||||
if ( ! is_admin() || ! is_user_logged_in() ) {
|
if ( ! is_admin() || ! is_admin_bar_showing() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue