Run custom PHP after payment

In the Pro version there is a WordPress hook which you can use to run your own PHP functions – the hook is called: cf7pp_payment_successful

This hook is executed in includes/payments/stripe_handler.php and includes/payments/paypal_handler.php

This runs for both PayPal & Stripe payments.

Hook:

do_action('cf7pp_payment_successful', $post_id, $txn_id);

 

Example:

function test_function($post_id, $tnx_id) {
}
add_action("cf7pp_payment_successful", "test_function", 10, 2);