Last active
February 21, 2020 08:22
-
-
Save strangerstudios/355d1cf82b516e69c9ea25197fe09b3f to your computer and use it in GitHub Desktop.
Test a Stripe Webhook Event with WordPress and Paid Memberships Pro
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
/* | |
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