Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created January 6, 2016 21:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strangerstudios/99233261f77500c4723c to your computer and use it in GitHub Desktop.
Save strangerstudios/99233261f77500c4723c to your computer and use it in GitHub Desktop.
Redirect to the membership account page instead of the home page after email validation with the PMPro Email Confirmation add on.
/*
Redirect to the membership account page instead of the home page after email validation with the PMPro Email Confirmation add on.
Add this code to your active theme's functions.php or a custom plugin.
*/
function my_pmproec_after_validate_user() {
if(is_user_logged_in())
wp_redirect("/membership-account/");
else
wp_redirect(wp_login_url("/membership-account/"));
exit;
}
add_filter('pmproec_after_validate_user', 'my_pmproec_after_validate_user');
@ideadude
Copy link

ideadude commented Jul 4, 2019

I've forked this gist here because I can no longer edit gists under the strangerstudios username:
https://gist.github.com/ideadude/1440a2945fa7e0e347c3e6a52a0bb65c

An improved version of the gist can be found there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment