Created
January 6, 2016 21:53
-
-
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.
This file contains 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
/* | |
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'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.