Last active
September 6, 2020 16:51
-
-
Save mehul0810/d842908cd4491bb97acd73315295cc95 to your computer and use it in GitHub Desktop.
Update description on payment page for Mastercard (MPGS) for Give
This file contains hidden or 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
<?php | |
function mg_update_payment_description( $text, $donationId ) { | |
$donation_type = give_get_meta( $donationId, 'donation_type', true ); // `donation_type` is the custom field key added by the Form Field Manager. | |
return "{$text} - {$donation_type}"; | |
} | |
add_filter( 'mgmcfg_update_form_description', 'mg_update_payment_description', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment