HI there,
Hmmm… it looks like it SHOULD be editable from the Donation Subject field, but isn’t. We’ll have to look into that.
For now you can change it with this custom snippet:
function my_give_text_switcher( $translations, $text, $domain ) {
if ( $domain == 'give' && $text == 'Donation Receipt' ) {
$translations = __( 'Receipt', 'give' );
}
return $translations;
}
add_filter( 'gettext', 'my_give_text_switcher', 10, 3 );
If you need guidance implementing custom PHP functions on your website, we have this guide here: https://givewp.com/documentation/resources/adding-custom-functions-to-your-wordpress-website/
Thanks!
When I tried to paste this in it comes up saying: Sorry, but your code causes a “Fatal error”, so it is not applied! Please, check the code and try again.
Is there another code I could please try?
Thank you!
Hey @laurenandchris – I just checked the code and did not see any errors. Are you sure everything was copy and pasted properly? 🙂
I copied the code exactly and added it to my custom functions PHP code…
It said the same message, that there was a fatal error and code couldn’t be applied. This is a cut and paste of exactly what I copied… is there something wrong? What else could I please try? Is there some where else I need to cut and paste it into? I really appreciate your help!
function my_give_text_switcher( $translations, $text, $domain ) {
if ( $domain == ‘give’ && $text == ‘Donation Receipt’ ) {
$translations = __( ‘Receipt’, ‘give’ );
}
return $translations;
}
add_filter( ‘gettext’, ‘my_give_text_switcher’, 10, 3 );
Honestly it looks good to me. Is there another function that is causing the fatal error higher up? I’m not seeing any syntax errors which would cause it in this function.
Hi @laurenandchris just following up, we’d love to get this working for you. Let us know what we can do.