Created
September 9, 2017 19:07
-
-
Save SeanTOSCD/a966bcb54d804a194d770d8d2febf612 to your computer and use it in GitHub Desktop.
EDD Checks Gateway Email Customization
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
<?php // DO NOT COPY THIS LINE | |
// Checks Gateway email subject adjustment | |
function sd_eddcg_custom_admin_notification_subject( $subject ) { | |
$subject = 'New Pending Offline Donation'; | |
return $subject; | |
} | |
add_filter( 'eddcg_admin_purchase_notification_subject', 'sd_eddcg_custom_admin_notification_subject' ); | |
// Checks Gateway email body adjustments | |
function sd_eddcg_custom_admin_notification( $email ) { | |
$search = array( | |
'A Downloads purchase has been made.', | |
'Downloads sold:', | |
'Purchased by:', | |
'Amount:', | |
'This is a pending purchase awaiting payment.' | |
); | |
$replace = array( | |
'A new Offline Donation has been made.', | |
'Donation Summary:', | |
'Donated by:', | |
'Donation Amount:', | |
'This is a pending donation awaiting payment.' | |
); | |
$email = str_replace( $search, $replace, $email ); | |
return $email; | |
} | |
add_filter( 'eddcg_admin_purchase_notification', 'sd_eddcg_custom_admin_notification' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment