Bug with admin_bar with woocommerce users
-
admin_bar is showing with user of woocommerce (customer, etc…).
This code is the cause :
function mt_admin_bar() {
add_action(‘admin_bar_menu’, ‘maintenance_add_toolbar_items’, 100);
if (!is_super_admin() ) {
$mt_options = mt_get_plugin_options(true);
if (isset($mt_options[‘admin_bar_enabled’]) && is_user_logged_in()) {
add_filter(‘show_admin_bar’, ‘__return_true’);
} else {
add_filter(‘show_admin_bar’, ‘__return_false’);
}
}
}keep up your work
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Bug with admin_bar with woocommerce users’ is closed to new replies.