Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gravity Forms: Change Stripe receipt description.
/* Change the description of Gravity Forms/Stripe Form Stripe Receipt (product)
----------------------------------------------------------------------------------------*/
add_filter( 'gform_stripe_charge_description', 'ag_custom_product_receipt', 10, 4 );
function ag_custom_product_receipt( $description, $strings, $entry, $submission_data ) {
$payment_amount = rgar( $submission_data, 'payment_amount' );
$description = "Payment Amount: " . $payment_amount;
GFCommon::log_debug( __METHOD__ . "(): Custom description for the product: " . $description );
return $description;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment