Skip to content

Instantly share code, notes, and snippets.

@MaryOJob
Forked from ugonkwocha/PMPro Gist
Last active October 27, 2023 12:12
Show Gist options
  • Save MaryOJob/b4ad079e47afa98def6e79dde50fd1ff to your computer and use it in GitHub Desktop.
Save MaryOJob/b4ad079e47afa98def6e79dde50fd1ff to your computer and use it in GitHub Desktop.
Redirect to another page / site after a PMPro checkout.
<?php // DO NOT COPY THIS LINE
/* See full article here please: https://www.paidmembershipspro.com/set-up-unique-membership-confirmation-pages-based-on-level/
* Copy this into a PMPro Customizations Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
**/
function my_pmpro_confirmation_url($rurl, $user_id, $pmpro_level) {
if(pmpro_hasMembershipLevel(2))
$rurl = "https://online.9jacodekids.com/my-account/";
elseif(pmpro_hasMembershipLevel(3))
$rurl = "https://online.9jacodekids.com/my-account/";
elseif(pmpro_hasMembershipLevel(4))
$rurl = "https://online.9jacodekids.com/my-account/";
return $rurl;
}
add_filter('pmpro_confirmation_url', 'my_pmpro_confirmation_url', 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment