Role permissions
-
G’day Tim,
How do I allow certain roles access to Loco Translate via the admin end. So far, I noticed only Administrator role is given access. I’m using the WooCommerce plugin, which provides additional roles like “Shop Manager” and “Customer”. I too have removed all of WP’s core roles except for Administrator.
Will I need to use any additional plugin, such as Capability Manager Enhanced to probably merge WooCommerce’s and WP’s capabilities? I wish to avoid adding more plugins into my website, if that’s possible.
Please advise. Thank you in advance.
-
In version 1 – It’s not the role, it’s the capability. Anyone with the
manage_optionscapability has access. This can also be filtered byloco_admin_capabilityIn version 2 – this is built into the settings and there is no filter.
Thanks, Tim. I’ve added the “manage_options” capability to WooCommerce’s “Shop Manager” role in my active theme’s functions.php, and it worked.
function add_role_caps() { // check if WooCommerce plugin exists if (class_exists( 'WooCommerce' ) ) { // gets the Shop Manager role $role = get_role( 'shop_manager' ); // allow shop manager to manage options $role->add_cap( 'manage_options' ); } } add_action( 'admin_init', 'add_role_caps' );How do you get it filtered by loco_manage_capability?
See this thread. https://wordpress.org/support/topic/capability-filter
Many thanks, Tim. (^_^)v
The topic ‘Role permissions’ is closed to new replies.