Skip to content

Instantly share code, notes, and snippets.

@Shelob9
Last active April 1, 2017 01:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shelob9/9378df609231f8d1a432db7372ecdf14 to your computer and use it in GitHub Desktop.
Save Shelob9/9378df609231f8d1a432db7372ecdf14 to your computer and use it in GitHub Desktop.
Log errors from Stripe API when submitting charges with Caldera Forms Stripe - https://calderaforms.com/downloads/caldera-forms-stripe-add-on/
<?php
add_action( 'cf_stripe_post_payment', function( $charge){
if( ! empty( $charge->failure_message)) {
error_log( $charge->failure_message );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment