Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created April 8, 2016 14:47
Show Gist options
  • Save strangerstudios/165e2f65e8764c7a1686452fd5c9705e to your computer and use it in GitHub Desktop.
Save strangerstudios/165e2f65e8764c7a1686452fd5c9705e to your computer and use it in GitHub Desktop.
Example of using the pmpro_confirmation_url filter to change the PMPro confirmation page for new users.
function my_pmpro_confirmation_url($url, $user_id, $level) {
$already_member = get_user_meta($user_id, 'already_member', true);
if(!$already_member) {
update_user_meta($user_id, 'already_member', 1);
$url = home_url('/my-dashboard');
}
return $url;
}
add_filter('pmpro_confirmation_url', 'my_pmpro_confirmation_url');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment