Nilog Developers
  • Introduction
  • Integrations
    • WooCommerce
      • Adding Products
      • Variable Product
      • Product Attributes
      • Managing Orders
      • Coupon Management
      • Currency Switcher
      • WooCommerce Reports
      • WooCommerce Analytics
      • Tax Settings
      • Multi Vendors
      • Email Settings
      • WooCheckout Webview
      • Web Store Layout
    • App Builder
      • App Builder Widgets
    • User Authentication
      • Login with Google
      • Login with Apple
      • Login with Facebook
      • Login with Firebase OTP
    • Cloud Messaging
      • Firebase Cloud Messaging
      • OneSignal
    • Google Maps API Key
  • Developers
    • React Native Development Setup
    • WP Generate Rest API keys
  • Reference
    • API spec
      • WordPress
    • Language Support
    • Changelog
      • App Builder
      • Nilog Monitor
    • Upgrade Your App
    • License Key
    • Enable WP Debug
    • Troubleshooting
      • JWT Authentication for WP REST API plugin installed
      • Hide Admin Account From Vendor List In Dokan Backend
Powered by GitBook
On this page
  1. Reference
  2. Troubleshooting

Hide Admin Account From Vendor List In Dokan Backend

PreviousJWT Authentication for WP REST API plugin installed

Last updated 3 years ago

Dokan Multivendor plugin has a cool feature to show all the vendor list on the WordPress Backend -> Dokan -> Vendors area. Where the site admin can easily edit any vendor information, banner image, or profile image.

Now, the main problem is the vendor list is not only showing a vendor account. It is also showing all the administrator account too. So, if your website has 5 admins and 20 vendors then on the vendor list it is showing 25. Arggh! sometimes you might get confused that how come I have 25 vendors while the User list is showing 20 :/

How to hide admin account from the vendor list?

You need a child theme’s functions.php or use PHP inserter plugin to use the below code

function exclude_some_sellers_users( $seller_args ) {
    $seller_args['role__in'] = array( 'seller' ); // add here roles
    return $seller_args;
}
add_action( 'dokan_rest_get_stores_args', 'exclude_some_sellers_users', XX );

Replace XX with the admin's User ID

This solution is found here

Hide Admin Account From Vendor List In Dokan Backend - nayemDevsnayemDevs
Logo