I want to know if the shop_manager is logged-in WP/woocommerce. I know the function is_admin(), but do you know a way to use something like this ‘is_shop_manager()’ ?
Thanks
I want to know if the shop_manager is logged-in WP/woocommerce. I know the function is_admin(), but do you know a way to use something like this ‘is_shop_manager()’ ?
Thanks
You must be logged in to post a comment.
Actually Yes, there is!
Docs:
current_user_can($capability)
‘manage_woocommerce’
No, there is not any direct inbuilt function as shop_manager role is coming from WooCommerce & not from WordPress, but it can be achieved with following code:
Hope this will be useful.
Fixed code: