Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created February 3, 2015 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strangerstudios/85bc92ceb27c12b90337 to your computer and use it in GitHub Desktop.
Save strangerstudios/85bc92ceb27c12b90337 to your computer and use it in GitHub Desktop.
Redirect s2members IPN URL to the PMPro IPN UR
/*
Redirect s2members IPN URL to the PMPro IPN URL, e.g.
https://yoursite.com/?s2member_paypal_notify=1 =>
https://yoursite.com/wp-admin/admin-ajax.php?action=ipnhandler
*/
function my_ipn_redirect() {
if(!empty($_REQUEST['s2member_paypal_notify']) && defined('PMPRO_DIR'))
{
require_once(PMPRO_DIR . "/services/ipnhandler.php");
exit;
}
}
add_action('init', 'my_ipn_redirect');
@laurenhagan0306
Copy link

This recipe is included in the blog post on "Redirect the s2member IPN URL to the PMPro IPN URL" at Paid Memberships Pro here: https://www.paidmembershipspro.com/redirect-the-s2member-ipn-url-to-the-pmpro-ipn-url/

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