Home Forums Plugins Aliexpress Dropshipping and Fulfillment for WooCommerce Limit vendors that will have access to ALD in Dokan dashboard

Limit vendors that will have access to ALD in Dokan dashboard

  • Author
    Posts
  • #155743

    Edemilson Lima
    Participant

    I wanted to limit access to the ALD screens on the seller’s Dashboard in Dokan so that only certain users could access those screens. I was able to do this by inserting the code lines below in the “/public_html/wp-content/plugins/woocommerce-alidropship/admin/vendor.php” file, in the first line of dokan_get_dashboard_nav() and dokan_query_var_filter() methods. This worked for what I want, but I’ll have to do this every time the plugin is updated. Is there a more practical way to hide those screens, perhaps using a Code Snippet?

    if (! in_array(get_current_user_id(), [3, 6])) return $urls;
    if (! in_array(get_current_user_id(), [3, 6])) return $query_vars;

    Best regards,

    GDI Developers

You must be logged in to see replies to this topic. Click here to login or register