Last active
August 7, 2020 16:01
-
-
Save ideadude/d80db32493be3fa4126873b79ce845f5 to your computer and use it in GitHub Desktop.
Forward PMPro IPN messages from one site to another.
This file contains hidden or 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
/** | |
* Forward PMPro IPNs to another PMPro site. | |
*/ | |
function my_pmpro_forward_ipn() { | |
$fp = wp_remote_post( 'https://theothersite.com/wp-admin/admin-ajax.php?action=ipnhandler', $_POST ); | |
} | |
add_action('wp_ajax_nopriv_ipnhandler', 'my_pmpro_forward_ipn', 5); | |
add_action('wp_ajax_ipnhandler', 'my_pmpro_forward_ipn', 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment