Claim your freedom to choose the perfect partner for your multi-vendor journey.

FREEDOM25

Celebrate the festive season by giving your marketplace a powerful lift!

FESTIVE20

5.0.x
Multi-store. Franchise. Facilitator. AI tools.
Everything your marketplace needs - now in one platform.
Power your marketplace dreams with unbeatable Black Friday deals!

MVXBLACK30

Supercharge your marketplace vision with unstoppable Cyber Monday deals!

MVXCYBER30

Holiday cheer, bigger savings
Take 25% off-because your marketplace deserves a gift too.

happyholiday

-
DAYS
-
HOURS
-
MINUTES
-
SECONDS
20% Off Is Temporary. The Benefits Aren't.

HAPPY20

Join the MultiVendorX Facebook Community

Contact, share, and grow with thousands of MultiVendorX users around the world.

Disable redirect to dashboard

Resolved
Viewing 3 reply threads
  • Author
    Posts
    • #237366
      willalaw
      Participant

      Greetings. The webpage redirects to the vendor dashboard every time after login. I want it redirected to my account page.
      Thank you.

    • #237367

      Hi @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;
      }
    • #237369
      willalaw
      Participant

      Thanks. Problem solved.

    • #237388

      Hi @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.

Viewing 3 reply threads
  • The topic ‘Disable redirect to dashboard’ is closed to new replies.
Shopping Cart
Launch Your Marketplace
in Days, Not Month
Get expert guidance to build, scale, and grow your MultiVendorX marketplace
Book Free Strategy Call
Trusted by 10000+ marketplace Owners
Scroll to Top