-
-
Save andrewlimaza/b77d7454c56a3ca5eb256af9061b8c4b to your computer and use it in GitHub Desktop.
Redirect WooCommerce PayPal Standard To PMPro IPN Handler.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Redirect WooCommerce IPN Requests to PMPro IPN as well. | |
function my_ipn_redirect() { | |
if ( ! empty( $_REQUEST['wc-api'] ) && defined( 'PMPRO_DIR' ) ) { | |
require_once( PMPRO_DIR . "/services/ipnhandler.php" ); | |
exit; | |
} | |
} | |
add_action('init', 'my_ipn_redirect'); |
This recipe is included in the blog post on "Redirect the PayPal IPN for PMPro to WooCommerce" at Paid Memberships Pro here: https://www.paidmembershipspro.com/redirect-the-paypal-ipn-for-pmpro-to-woocommerce/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are using WooCommerce and PMPro. You can set the IPN URL in PayPal to the WooCommerce URL and then install this code to make sure PMPro processes IPN requests as well.