Hello @medbens ,
Do you want to disable access to WooCommerce’s my-account page for vendors?
You can use the template_reirect action of WordPress to do that. For example –
function custom_redirects() {
$user = wp_get_current_user();
if ( is_account_page() && (in_array( 'seller', (array) $user->roles )) ) {
wp_redirect( home_url( '/dashboard/' ) ); //change dashboard to your dashboard slug
die;
}
}
add_action( 'template_redirect', 'custom_redirects' );
Try this code in your functions.php file. It will redirect the vendors to the dashboard if they try to visit the my-account page.
You can also use any permission-related plugin for WordPress to achieve the result.
Thank you 🙂
I will try this and thanks for your quick reply