Last active
March 13, 2018 17:52
-
-
Save anythinggraphic/b6a43b517f3d7ec640ea8405cad8663d to your computer and use it in GitHub Desktop.
Gravity Forms: Change Stripe receipt description.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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