Mahbubur Rahman

Thoughts and Writings

15 Dec 2016
How can redirect to the “seller dashboard” instead of seller setup wizard

To define the seller dashboard page instead of setup wizard after registering as a new seller, you can add the following code to your theme’s functions.php file.

Note: This is a Developer level doc. If you are unfamiliar with code/templates and resolving potential conflicts, contact me for assistance.
// define the seller dashboard page instead of setup wizard to redirect after registering as a new seller.
add_filter( 'woocommerce_registration_redirect', 'custom_woocommerce_registration_redirect', 11, 1 );
function custom_woocommerce_registration_redirect( $var ) {
    $url  = $var;
    $user = wp_get_current_user();

    if ( in_array( 'seller', $user->roles ) ) {
        $url = dokan_get_navigation_url('/dashboard');
    }


    return $url;
}
Leave a Comment

Your email address will not be published. Required fields are marked *