@@trimastir, in order to direct the vendor to the backend, when they will login, add the following code to the function.php of the current active theme :
add_filter('login_redirect', 'wp_wcmp_vendor_login_redirect', 99, 3);
function wp_wcmp_vendor_login_redirect($redirect_to, $requested_redirect_to, $user)
{
//is there a user to check?
if(class_exists('WCMp')){
if (isset($user->roles) && is_array($user->roles)) {
//check for vendor
if (in_array('dc_vendor', $user->roles)) {
// redirect them to the default place
Return 'https://demo.dualcube.com/wordpress/wp1013/wp-admin/';
}
}
}
}
add_filter('woocommerce_login_redirect', 'wcmp_vendor_login_redirect', 99, 2);
function wcmp_vendor_login_redirect($redirect_to, $user){
if(class_exists('WCMp')){
if (isset($user->roles) && is_array($user->roles)) {
//check for vendor
if (in_array('dc_vendor', $user->roles)) {
// redirect them to the default place
Return 'https://demo.dualcube.com/wordpress/wp1013/wp-admin/';
}
}
}
}