Okay
  Public Ticket #3385819
How to Deactivate My Customers section in Sales Agent Dashboard
Closed

Comments

  •  7
    Pedro Garcia started the conversation

    Hello, I see that my agents can see their customers data (address, etc) and they can even impersonate via the Shop as Customer button in the My Customers section of the Sales Agent Dashboard.

    Can I deactivate this function? It would be ok for me to deactivate completely the MyCustomers section. I see I can deactivate several options in the Agent Capabilities section under the SalesKing/Settings menu in the WordPress Menu but I cannot deactivate MyCustomers. 

    It is a potential privacy issue. My agents are more like affiliates. They should not see so much info about their clients and definitely should not impersonate. 

    Thank you.

  •  2,218
    WebWizards replied

    It is possible to remove the 'My Customers' page, by adding this code snippet to your site:

    add_filter('salesking_dashboard_menu_items', function($menu){
        unset($menu['customers']);
        return $menu;
    }, 10, 1);
    

    A PHP snippet can be added to functions.php, or by following our guide here: https://woocommerce-b2b-plugin.com/docs/how-to-add-a-snippet-php-or-js/


    Kind regards,

    Stefan

  •  7
    Pedro Garcia replied

    It worked perfectly! 

    Summary for anyone else with the need to hide My Customers section from the Agents Dashboard:

    - Install Code Snipets plugin: https://wordpress.org/plugins/code-snippets/

    - Add PHP snipet with this code  (plugin is free for PHP)

    add_filter('salesking_dashboard_menu_items', function($menu){    unset($menu['customers']);    return $menu;
    }, 10, 1);

     Option: Only run on site front-end. Save changes and Activate

    Et voilá. My customers section dissapears from the Agent Dashboard

    P.S.: Please note total number of orders and customers still show in the Dashboard, but agents cannot see details. 

    Thank you so much Stefan. This saved my day.