Skip to content

Instantly share code, notes, and snippets.

@DumahX
Created March 31, 2021 14:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DumahX/0b8c0e06ce55b9c7dcfb362b7609be10 to your computer and use it in GitHub Desktop.
Save DumahX/0b8c0e06ce55b9c7dcfb362b7609be10 to your computer and use it in GitHub Desktop.
<?php
function mepr_forward_old_ipn() {
if ( ! isset( $_GET['option'] ) && $_GET['option'] != 'com_osmembership' || empty( $_POST ) ) {
return;
}
$memberpress_ipn_url = 'https://www.site.com/mepr/notify/pja675-3wu/ipn'; // CHANGE THIS
wp_remote_post( $memberpress_ipn_url, array( 'body' => stripslashes_deep( $_POST ), 'sslverify' => false ) );
_e( 'Success', 'memberpress' );
die();
}
add_action( 'init', 'mepr_forward_old_ipn' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment