• Resolved kaprikorn

    (@kaprikorn)


    Hi. I created a secondary vendor user role, called “digital” specially designed for vendors who only want to sell digital products and with the same capabilities as vendor/seller user role. However users who are registered under that secondary user role do not appear in the Dokan vendor list on the backend. How can I solve this issue? Thank you

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi @kaprikorn,

    If you want to get other user role users at the Dokan > Vendors and Store List page, you can add the code snippet at the bottom of the child theme’s functions.php file.

    #-- Manager Vendors Args --#
    function manager_vendor_args( $seller_args ) {
      $seller_args['role__in'] = [ 'seller', 'administrator', 'editor' ];
      return $seller_args;
    }
    add_action( 'dokan_seller_listing_args', 'manager_vendor_args', 10 );
    add_action( 'dokan_rest_get_stores_args', 'manager_vendor_args', 10 );

    Thank you!

    Thread Starter kaprikorn

    (@kaprikorn)

    Hi Tanjir,

    It is working! Thank you so much! You made my day! I have another little question related to the store list. How can I have the user role show in the list? Thanks in advance.

    Hi @kaprikorn,

    In my previous tweak, you can see there has an action hook dokan_seller_listing_args, which is used to manage user roles on the store list page.

    Thank you!

    Thread Starter kaprikorn

    (@kaprikorn)

    Hi Tanjir,

    Maybe I did not frame my question properly. What I mean, once I have added the snippet code you mentioned above and get other roles to appear in the store list on both front- and backend, I would like to have the user role info to show on the backend panel list among other customer info as per the link below. I hope this now makes more sense. Thank you.

    https://drive.google.com/file/d/1o8VKxFsm-oCM_afaj0PjoAMfQ_FPSeTs/view?usp=sharing

    Hi @kaprikorn,

    The Dokan > Vendor screen has been built with Vue.js. By default, the customization on that screen is not available. So, any code tweaks are not available.

    If you want to add any additional field on that screen, you need to modify the core vue-admin.min.js file. The file is located in the following directory –
    wp-content\plugins\dokan-lite\assets\js.

    Kindly note that core file modification will reverts to the original after an update. So, you need to apply the change each time after and update.

    Thank you!

    Thread Starter kaprikorn

    (@kaprikorn)

    OK. Well noted Tanjir. Thank you again!

    Thread Starter kaprikorn

    (@kaprikorn)

    Resolved!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘User role and vendor list on backend’ is closed to new replies.