Created
August 28, 2020 10:13
-
-
Save RadGH/e7943b63c091214e6d49c5e16584529a to your computer and use it in GitHub Desktop.
Gravity Forms: Action on payment complete for stripe and paypal standard
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
| <?php | |
| // Both of these work | |
| // @hook do_action( 'gform_stripe_fulfillment', $session, $entry, $feed, $form ); | |
| function bpc_debug_stripe( $session, $entry, $feed, $form ) { | |
| error_log( 'Payment received for STRIPE' ); | |
| } | |
| add_action( 'gform_stripe_fulfillment', 'bpc_debug_stripe', 20, 4 ); | |
| // @hook do_action( 'gform_paypal_fulfillment', $entry, $feed, $transaction_id, $amount ) | |
| function bpc_debug_paypal( $entry, $feed, $transaction_id, $amount ) { | |
| error_log( 'Payment received for PAYPAL' ); | |
| } | |
| add_action( 'gform_paypal_fulfillment', 'bpc_debug_paypal', 20, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment