If you’re using Paid Memberships Pro along with another WordPress plugin that relies on PayPal IPN (Instant Payment Notification), you may need to redirect paypal IPN requests between both systems.
PayPal allows only one IPN URL in your PayPal account settings. However, this code recipe shows you how to forward those IPN requests to PMPro, so your membership transactions are still processed even if the IPN is routed to another plugin.
This is helpful for sites using PMPro for memberships and another plugin for generic ecommerce, digital downloads, or donation handling.

When Do You Need to Redirect PayPal IPN
This code recipe is only needed for sites that are simultaneously running two or more ecommerce plugins that all require you to define an IPN URL in your PayPal account. Here are some examples of other WordPress plugins that support settings the IPN URL and what that URL looks like:
Easy Digital Downloads [docs]
https://domain.com/?edd-listener=eppe
GiveWP [docs]
https://domain.com/?give-listener=IPN
WP Download Manager [docs]
https://domain.com/?action=wpdmpp-payment-notification&class=Paypal
Paymattic [docs]
https://domain.com/?wpf_paypal_ipn=1
WooCommerce PayPal Standard (Legacy) [docs]
https://domain.com/?wc-api=WC_Gateway_Paypal
In each of these cases, setting your IPN URL in PayPal directs the IPN request only to that plugin, bypassing PMPro. In this case, you must use an adjust snippet like the one below to help PMPro receive and process the IPN data as well.
The Code Recipe: Redirect PayPal IPN
The example below detects and forwards IPN data from the legacy WooCommerce PayPal Standard gateway. If you are using another ecommerce plugin that also relies on the PayPal IPN, update the $_REQUEST
check on line 4 to redirect the PayPal IPN by matching the URL structure to your ecommerce platform’s setup.
Adding the Recipe to Your Website
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method.
Update the $_REQUEST['wc-api']
value on line 4 to match your IPN structure. For example, if you are trying to forward the GiveWP IPN to PMPro, you would update this line to $_REQUEST['give-listener']
.