Sure, you can hook here …
do_action( 'asp_stripe_payment_completed', $data, $data['charge'] );
Thread Starter
clem97
(@clem97)
Thank you for your answer 🙂
But I don’t understand. Normally, the webhook must be created from Stripe. And a custom action is configured in the called page.
But here, the do_action has to be configured in wordpress, so how to call it ?
Thank you very much !
I just thought you needed to trigger something on your site during payment complete stage.
If you call this hook which is already inside the plugin and dump those vars, you’ll see what I mean.
function getTransactionData( $data, $data['charge'] ) {
echo '<pre>';
var_dump($data);
echo '</pre>';
}
add_action( 'asp_stripe_payment_completed', 'getTransactionData', 10, 2);
Put it inside WordPress Code Snippets plugin if you don’t want to create your own plugin or modify your theme files.
You can also check out the existing addons for this plugin. Maybe it helps with what you’re trying to achieve.
-
This reply was modified 4 years, 10 months ago by
Ovidiu.
-
This reply was modified 4 years, 10 months ago by
Ovidiu.
-
This reply was modified 4 years, 10 months ago by
Ovidiu.