Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Last active February 21, 2020 08:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strangerstudios/355d1cf82b516e69c9ea25197fe09b3f to your computer and use it in GitHub Desktop.
Save strangerstudios/355d1cf82b516e69c9ea25197fe09b3f to your computer and use it in GitHub Desktop.
Test a Stripe Webhook Event with WordPress and Paid Memberships Pro
/*
Test Stripe webhook events
Add to a custom plugin, then visit /?teststripe=1
*/
function init_test_stripe() {
if(!empty($_REQUEST['teststripe'])) {
$_REQUEST['event_id'] = 'evt_9ktqwT5xFlKNOp'; //EDIT THIS to be the ID of an actual recurring payment event in your account
require_once(PMPRO_DIR . "/services/stripe-webhook.php");
exit;
}
}
add_action('init', 'init_test_stripe');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment