Skip to content

Instantly share code, notes, and snippets.

@anythinggraphic
Last active March 13, 2018 17:52
Show Gist options
  • Save anythinggraphic/b6a43b517f3d7ec640ea8405cad8663d to your computer and use it in GitHub Desktop.
Save anythinggraphic/b6a43b517f3d7ec640ea8405cad8663d to your computer and use it in GitHub Desktop.
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