Created
June 22, 2016 09:21
-
-
Save nayemDevs/54f5dc2ee1fb2c97750a1777d94d6784 to your computer and use it in GitHub Desktop.
You can replace the location "settings/store" to your own location like as dokan_get_navigation_url( 'dashboard' );
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter('woocommerce_registration_redirect', 'ps_wc_registration_redirect'); | |
function ps_wc_registration_redirect( $redirect_to ) { | |
if ( is_user_logged_in() ){ | |
$current_user = wp_get_current_user(); | |
if( $current_user->roles[0] == 'seller' ) { | |
$redirect_to = dokan_get_navigation_url( 'settings/store' ); | |
return $redirect_to; | |
} | |
} | |
return $redirect_to; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment