• Resolved ttremain

    (@ttremain)


    I’m new to Dokan. My client has a “list of members”. From that list I need to see if each member has a shop, and get shop name and URL or permalink.

    Any assistance or direction would be appreciated.

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Hello,

    I will suggest you to check the user role if it is seller or not with the below function :

    /**
     * Check if a user is seller
     *
     * @param int $user_id
     * @return boolean
     */
    function dokan_is_user_seller( $user_id ) {
        if ( ! user_can( $user_id, 'dokandar' ) ) {
            return false;
        }
    
        return true;
    }

    Also, you can collect all the user list and then use foreach loop to check if this dokan()->vendor()->get( $vendor_id )->is_vendor() true or not ??

    You can find more details here /wp-content/plugins/dokan/includes/functions.php

Viewing 1 replies (of 1 total)
  • The topic ‘Find shop by user_ID’ is closed to new replies.