WCMp Advanced Frontend Manager
-
AuthorPosts
-
-
February 21, 2022 at 5:11 PM #134677DragNfLyParticipant
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 -
February 21, 2022 at 6:53 PM #134682MVX Support NinjaKeymaster
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; } }
CopyRegards,
-
February 24, 2022 at 3:41 PM #134811DragNfLyParticipant
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 -
February 24, 2022 at 6:04 PM #134826NerdySupportExpert MoumitaKeymaster
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. -
February 25, 2022 at 2:32 PM #134858alievserega17Participant
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.
-
February 25, 2022 at 7:14 PM #134880NerdySupportExpert MoumitaKeymaster
@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
-
-
AuthorPosts
The topic ‘Vendor Redirect / User Redirect’ is closed to new replies.