Created
December 16, 2019 13:23
Filter examples for Caldera Forms Stripe https://calderaforms.com/downloads/caldera-forms-stripe-add-on/ https://calderaforms.com/doc/controlling-stripe-charge-data/
This file contains 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 | |
/** | |
* Change Caldera Forms Stripe Payment Amount | |
*/ | |
add_filter( 'cf_stripe_charge_args', function( $args, $config, $form ){ | |
//change charge amounts to $10. Amount is in cents. | |
$args["line_items"][0][ "amount" ] = 1000; | |
return $args; | |
}, 10, 4 ); |
This file contains 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 | |
/** | |
* Change Caldera Forms Stripe Receipt email | |
*/ | |
add_filter( 'cf_stripe_charge_args', function( $args, $config, $form ){ | |
//change email | |
$args['payment_intent_data'][ 'receipt_email' ] = 'hiroy@calderawp.com'; | |
return $args; | |
}, 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment