Skip to content

Instantly share code, notes, and snippets.

@RadGH
Created August 28, 2020 10:13
Show Gist options
  • Save RadGH/e7943b63c091214e6d49c5e16584529a to your computer and use it in GitHub Desktop.
Save RadGH/e7943b63c091214e6d49c5e16584529a to your computer and use it in GitHub Desktop.
Gravity Forms: Action on payment complete for stripe and paypal standard
<?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