Resolved
- This topic has 3 replies, 2 voices, and was last updated 1 year, 6 months ago by
Sangita Support Squad.
Viewing 3 reply threads
-
AuthorPosts
-
-
November 28, 2024 at 7:03 PM #237366
willalaw
ParticipantGreetings. The webpage redirects to the vendor dashboard every time after login. I want it redirected to my account page.
Thank you. -
November 28, 2024 at 7:15 PM #237367
Sangita Support Squad
KeymasterHi @willalaw, In order to redirect the user from Vendor Dashboard to My Account page, add this code in the function.php of your current theme :
add_filter('login_redirect', 'wp_mvx_vendor_login_redirect', 99, 3); add_filter('woocommerce_login_redirect', 'mvx_vendor_login_redirect', 99, 2); function wp_mvx_vendor_login_redirect($redirect_to, $requested_redirect_to, $user) { //is there a user to check? if(class_exists('MVX')){ if (isset($user->roles) && is_array($user->roles)) { //check for vendor if (in_array('dc_vendor', $user->roles)) { // redirect them to the WooCommerce "My Account" page $redirect_to = wc_get_page_permalink('myaccount'); } } } return $redirect_to; } function mvx_vendor_login_redirect($redirect_to, $user){ if(class_exists('MVX')){ if (isset($user->roles) && is_array($user->roles)) { //check for vendor if (in_array('dc_vendor', $user->roles)) { // redirect them to the WooCommerce "My Account" page $redirect_to = wc_get_page_permalink('myaccount'); } } } return $redirect_to; } -
November 28, 2024 at 7:34 PM #237369
willalaw
ParticipantThanks. Problem solved.
-
November 29, 2024 at 10:47 AM #237388
Sangita Support Squad
KeymasterHi @willalaw, it’s great to hear that it is working fine 🙂
We would love it if you shared your experience by giving us 5/5 review here : https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post
Seeing glowing reviews from existing customers makes others more comfortable knowing they’ll get the support they need should an issue with our services arise.
-
-
AuthorPosts
Viewing 3 reply threads
- The topic ‘Disable redirect to dashboard’ is closed to new replies.




