Last active
July 14, 2025 11:37
-
-
Save andrewlimaza/0e52d43cd31f21e3a125b904f3ad69ed to your computer and use it in GitHub Desktop.
Logout and redirect users after successfully signing up using PMPRO
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
<?php | |
//copy lines 5-10 to your active theme's functions.php or custom PMPro plugin | |
function my_logout_after_register(){ | |
wp_logout(); | |
wp_redirect( '<SOME URL>' ); exit; //edit this line with the URL for users to be redirected to. | |
} | |
add_action('pmpro_confirmation_url', 'my_logout_after_register'); | |
?> |
@stumax I'm not too sure why it's not working for you, could you please open a support ticket on www.paidmembershipspro.com/support
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Trying this in wordpress 5.9 , the redirect does not seem to function, always gets redirected to homepage. Any ideas?
Thanks