Created
August 2, 2021 14:30
-
-
Save femiyb/578ea1ca51b935a1c29712f297863aab to your computer and use it in GitHub Desktop.
Give Shop Managers access to dashboard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This will Give WooCommerce Sho[p Managers access to the dashboad of you are removing access for other users | |
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function shop_manager_show_admin_bar() { | |
if(current_user_can('shop_manager')) { | |
add_filter( 'show_admin_bar', '__return_true' ); | |
} | |
} | |
add_action('init', 'shop_manager_show_admin_bar', 9); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment