Giving Shop_Manager access to wordfence
-
Hi,
Is it possible to grant Wordfence access to the Shop_Manager role.
I have been trying to achieve this for a couple days without success.Here is a snippet I use but I can’t see the wordfence menu and if I use the url of Wordfence I do not get access.
Thanks a lot
function add_wordfence_caps_to_shop_manager() {
// Get the Shop Manager role
$shop_manager_role = get_role(‘shop_manager’);// Add Wordfence capabilities if ($shop_manager_role) { $shop_manager_role->add_cap('wordfence'); $shop_manager_role->add_cap('wordfence_options'); }}
add_action(‘init’, ‘add_wordfence_caps_to_shop_manager’); -
Using “User Role Editor” plugin I can see that Shop_Manager hase the following capabilities so that should work in theory?
delete_wordfence_logs
edit_wordfence_logs
list_wordfence_logs
read_wordfence_logs
view_wordfence_live_traffic
view_wordfence_logs
view_wordfence_scans
wordfence
wordfence_options -
We can’t help with custom coding and third party plugins as Wordfence. You must take a look in the documentation of Wordfence.
-
Hi erolwebmanage!
WordFence Security is incompatible with WordPress.com as it conflicts with our default security features: https://wordpress.com/support/plugins/incompatible-plugins/#security-plugins
If your question is related to a self-hosted site, I recommend you check the WordFence support forum (https://wordpress.org/support/plugin/wordfence/) or contact them directly at https://www.wordfence.com/contact/
Best,
- The topic ‘Giving Shop_Manager access to wordfence’ is closed to new replies.