Last active
September 4, 2019 10:29
-
-
Save Shelob9/309436eb9450ff21dbdf042aa766d2bd to your computer and use it in GitHub Desktop.
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[ '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 Recipt email | |
*/ | |
add_filter( 'cf_stripe_charge_args', function( $args, $config, $form ){ | |
//change email | |
$args[ 'receipt_email' ] = 'hiroy@calderawp.com'; | |
return $args; | |
,}, 10, 3 ); |
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 Plan | |
*/ | |
add_filter( 'cf_stripe_recurring_args', function( $args, $config, $form ){ | |
//change plan. Plan MUST exist | |
$args[ 'plan' ] = 'fancy-plan'; | |
return $args; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment