Banner Logo

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

Vendor Shop page restrict

Restrict vendor from accessing own shop page #

By default, Vendors are directed to their dashboard page. For example, if f you want to change the redirect URL, then use the following code :

function my_page_template_redirect()
{
if( is_tax( ‘dc_vendor_shop’ ) )
{
$shop_page_url = get_permalink( woocommerce_get_page_id( ‘shop’ ) );
wp_safe_redirect($shop_page_url);
exit();
}
}
add_action( ‘template_redirect’, ‘my_page_template_redirect’, 999 );

Leave a Reply