Skip to content

Instantly share code, notes, and snippets.

@New0
Created December 16, 2019 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save New0/991571655353d47ada6cb519ff2b52ab to your computer and use it in GitHub Desktop.
Save New0/991571655353d47ada6cb519ff2b52ab to your computer and use it in GitHub Desktop.
<?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 );
<?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