Skip to content

Instantly share code, notes, and snippets.

@New0
Last active January 30, 2020 13:52
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/eabb663b2bb0950e9e0c28e1cb433134 to your computer and use it in GitHub Desktop.
Save New0/eabb663b2bb0950e9e0c28e1cb433134 to your computer and use it in GitHub Desktop.
Display a description for the payment on the Stripe interface. Requires Caldera Forms Stripe add-on
<?php
/*
* Plugin Name: CF Stripe Payment description
* Author: Nicolas Figueira
* Descriptipon: Display the description in the payments on the Stripe dashboard
*
*/
add_filter( 'cf_stripe_charge_args', function( $args, $config, $form ){
//The description can also be set to be different from the processor's settings
//Note that magic tags won't be correctly interpreted in the Stripe dashboard
$args['payment_intent_data'][ 'description' ] = $config['description'];
return $args;
}, 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment