Skip to content

Instantly share code, notes, and snippets.

@jonasvogel
Created July 28, 2015 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonasvogel/772c20d18b57ddef987c to your computer and use it in GitHub Desktop.
Save jonasvogel/772c20d18b57ddef987c to your computer and use it in GitHub Desktop.
Redirect users who registered through WSL to different site
// Fired after registration of new user though the WSL plugin
add_action( 'wsl_hook_process_login_after_wp_insert_user', 'jvo_wsl_after_registration', 10, 3 );
function jvo_wsl_after_registration( $user_id, $provider, $hybridauth_user_profile ) {
// Only fired if user registered using the WSL Plugin
// Add filter for redirect hook
add_filter( 'wsl_hook_process_login_alter_redirect_to', 'jvo_wsl_redirect_to', 10, 1 );
}
function jvo_wsl_redirect_to( $redirect_to ) {
// Change redirect url here
return $redirect_to;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment