avoid seeing sales data from vendor backend dashbaord

WCMp Advanced Frontend Manager

avoid seeing sales data from vendor backend dashbaord Open

Viewing 3 reply threads
  • Author
    Posts
    • #110239
      help
      Participant

      Hi, my vendors need to log in through the backend dashboard , however I notices that they have access to sales report from my whole marketplace. This is not acceptable as I don’t want all my vendors to know how much my marketplace is doing in sales… I attach a screenshot of what my vendors see… pleas help, how can I block my vendors from accessing this information?

    • #110345

      Hi,
      Use this below code in your current active theme functions.php file to remove report menu from vendor backend section

      add_action( 'admin_init', function() {
          	if (is_user_wcmp_vendor(get_current_user_id())) {
          		remove_menu_page( 'wc-reports' );
          	}
          } );
      Copy
    • #110523
      help
      Participant

      Hi, that only work for sales report. I also need to hide the “Analytics” tab (see screenshot) and the hubspot one.
      I tried following the same logic as for the code snippet you provided. So as the URL is
      I tried with

      add_action( 'admin_init', function() {
            if (is_user_wcmp_vendor(get_current_user_id())) {
              remove_menu_page( 'wc-admin' );
            }
          } );
      
      Copy

      it ddin’t work. So i tried with:

      add_action( 'admin_init', function() {
            if (is_user_wcmp_vendor(get_current_user_id())) {
              remove_menu_page( 'wc-admin&path=%2Fanalytics%2Foverview' );
            }
          } );
      
      Copy

      and

      add_action( 'admin_init', function() {
            if (is_user_wcmp_vendor(get_current_user_id())) {
              remove_menu_page( 'wc-admin&path=%2Fanalytics' );
            }
          } );
      
      Copy

      but nothing worked.

      For the hubspot tab i tried:

      
      add_action( 'admin_init', function() {
            if (is_user_wcmp_vendor(get_current_user_id())) {
              remove_menu_page( 'leadin_user_guide' );//this is the URL for the hubspot tab
            }
          } );
      
      Copy

      But didn’t work either!

      can you help, please!

    • #110539

      Hi,
      You cann’t remove these by useing same way what we did. This setting are comming from woocommerce and done by react native. This are not proper menu pages. Check this woocommerce support https://wordpress.org/support/topic/new-4-0-dashboard-is-so-bad/. What we have checked from this thread you have to use add_filter( ‘woocommerce_admin_disabled’, ‘__return_true’ ); this code in your plugin. It will not work in your theme. And one more thing is you cannot use this hook within init,wp,admin_init this hooks. So you can’t add checking with current user id. So please ask woocoommer how do you remove this for a perticular user role.

Viewing 3 reply threads

Please LOGIN to reply to this topic

Buy all Marketplace addons together, check out our Bundle

Buy at Slashed Price