Skip to content

Instantly share code, notes, and snippets.

@JarrydLong
Forked from strangerstudios/init_test_stripe.php
Created February 21, 2020 08:22
Show Gist options
  • Save JarrydLong/b8f58fcf908ed33a81f36fecb4452663 to your computer and use it in GitHub Desktop.
Save JarrydLong/b8f58fcf908ed33a81f36fecb4452663 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