• Hello and thank you for this plugin.

    Currently the Admin pages are available only for those with “manage_options” capability. Can you allow us to filter this or to switch it to “view_woocommerce_reports” so a Shop Manager can access the report page? At this moment Shop Managers can’t access the pages – which is a bit awkward since they are Shop Managers.

Viewing 1 replies (of 1 total)
  • Thread Starter Get Innovation Dev

    (@getinnovationdev)

    I was able to change the capabilities with this

    add_action( 'admin_menu', function(){
        remove_submenu_page('woocommerce', 'wccs');
        add_submenu_page( 'index.php', 'Customer Source', 'Customer Source', 'view_woocommerce_reports', 'wccs', array('WC_Customer_Source', 'display_main'), 9999 );
    }, 99999 );

    I had to remove the sub menu and create it again with a different capability. I had to put it under Dashboard (index.php) because it doesn’t work if I try to put it under Woocommerce tab using “woocommerce” as is currently in plugin.

    Now the report page is available for Shop Managers.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.