Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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 );
<?php
/**
* Change Caldera Forms Stripe Recipt email
*/
add_filter( 'cf_stripe_charge_args', function( $args, $config, $form ){
//change email
$args['payment_intent'][ 'receipt_email' ] = 'hiroy@calderawp.com';
return $args;
,}, 10, 3 );
<?php
/**
* Change Caldera Forms Stripe Payment Plan
*/
add_filter( 'cf_stripe_recurring_args', function( $args, $config, $form ){
//change plan. Plan MUST exist
$args['subscription_data']['items'][ 'plan' ] = 'fancy-plan';
return $args;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.