Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.