Banner Logo

Be a part of the family: Connect, Receive Support,
Contribute, and Reap Abundant Rewards!

Vendor Redirect / User Redirect

WCMp Advanced Frontend Manager

Resolved
Viewing 5 reply threads
  • Author
    Posts
    • #134677
      DragNfLy
      Participant

      Good Day,

      I am removing the Vendor Storefront page as WCMp design is not in line with my site and the Elementor Template does not work with my Theme.

      In order to redirect current logged-in users that might have bookmarked the URL to the Dashboard > Store Settings > Edit Storefront page(HOME/dashboard/storefront/); – I would like to have logged in Vendors redirected back to the Vendor Dashboard as the actual Storefront page still exists and to prevent confusion; – I do not want them to have access to this page any longer.

      For this I have tried the following code but it does not work. Could you please assist with correct code.

      add_action(‘template_redirect’, ‘redirect_storefront’,100000);
      function redirect_storefront(){
      if(is_user_logged_in() && is_tax( ‘dc_vendor_shop’ )) {
      wp_safe_redirect(‘dashboard’);
      exit;
      }
      }

      I look forward to hearing from you.

      Kind regards,
      Dale

    • #134682

      Hi,
      I have checked this code and it’s working fine on our end.

      Checkout the video, https://gdskavr9sw.vmaker.com/record/sibUFDKiPSeFSONo

      add_action('template_redirect', 'redirect_storefront',99);
      function redirect_storefront(){
          if(is_user_logged_in() && is_tax( 'dc_vendor_shop' )) {
              wp_safe_redirect('dashboard');
              exit;
          }
      }
      Copy

      Regards,

    • #134811
      DragNfLy
      Participant

      Thank you Abhirup,

      I had a cache issue and it is working.

      I believe the Storefront page is still published. How can I remove the storefront page from being published?

      Kind regards,
      Dale

    • #134826

      Dale, There is no such option to unset the vendor shop page, as our vendor shop page is nothing but a taxonomy page, like category, tax.

      So, you can stop the vendor and customer from accessing the page by directing users from the vendor’s shop page to site’s shop page. Hence, the customer/vendor will always be directed to the site’s shop page, when they will click on the vendor’s name.

      For this you have to follow this steps :

      – Hide the “My Shop” tab from vendor dashboard using some custom CSS so that vendor won’t be able to see the shop page.
      – Kindly add this previous snippet in the child theme’s function.php as this will redirect the customer.

    • #134858
      alievserega17
      Participant

      When a vendor manager logs in they are redirected to the WCFM page. Can I stop them from being redirected when on certain pages? I do not want them to be redirected when on a Woocommerce single product page.

    • #134880

      @alievserega17, thanks for reaching WCMp Support!!

      By default, WCMp redirects to the vendor dashboard. Please make sure the vendor dashboard page has this shortcode

      [wcmp_vendor]
      Copy
Viewing 5 reply threads

The topic ‘Vendor Redirect / User Redirect’ is closed to new replies.