Changing the Payment Description in the Stripe Add-On

Changing the Payment Description in the Stripe Add-On

If you need to change the payment description that is sent from your form to Stripe, you can do so quite easily using the gform_stripe_charge_description filter.
To do so you will need to place a bit of code within your site, such as your theme』s functions.php file or ideally, within it』s own plugin.
1234add_filter( 'gform_stripe_charge_description', 'change_stripe_description', 10, 3 );function change_stripe_description( $description, $strings, $entry ) {    return $description . '  Purchased By: ' . rgar( $entry, '1.5' );}
As you can see in the above example, the filter is being called which contains the order description, and form information. From here, we are modifying that information to contain not only the original description which is set to the $description variable, but also defining who the order was purchased by based on a field submission value.
For more information on the gform_stripe_charge_description filter, take a look at the main gform_stripe_charge_description article.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注