From 148ad2c30eae3c11622b2b9c9df33ae89dfb7f12 Mon Sep 17 00:00:00 2001 From: Ben Meredith Date: Mon, 8 Aug 2016 15:42:19 -0400 Subject: [PATCH 1/2] adds email tag support to offline donation admin notification email. Fixes #846 --- includes/gateways/offline-donations.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/gateways/offline-donations.php b/includes/gateways/offline-donations.php index 0ae1fba713..e24e5d8d00 100644 --- a/includes/gateways/offline-donations.php +++ b/includes/gateways/offline-donations.php @@ -228,8 +228,8 @@ function give_offline_send_admin_notice( $payment_id = 0 ) { $admin_message .= esc_attr__( 'Hooray! The donation is in a pending status and is awaiting payment. Donation instructions have been emailed to the donor. Once you receive payment, be sure to mark the donation as complete using the link below.', 'give' ) . "\n\n"; - $admin_message .= '' . esc_attr__( 'Donor: ', 'give' ) . '' . html_entity_decode( $name, ENT_COMPAT, 'UTF-8' ) . "\n"; - $admin_message .= '' . esc_attr__( 'Amount: ', 'give' ) . '' . html_entity_decode( $amount, ENT_COMPAT, 'UTF-8' ) . "\n\n"; + $admin_message .= '' . esc_attr__( 'Donor: ', 'give' ) . '' . '{fullname}' . "\n"; + $admin_message .= '' . esc_attr__( 'Amount: ', 'give' ) . '' . '{price}' . "\n\n"; $admin_message .= sprintf( '%2$s', @@ -238,6 +238,8 @@ function give_offline_send_admin_notice( $payment_id = 0 ) { ) . "\n\n"; $admin_message = apply_filters( 'give_offline_admin_donation_notification', $admin_message, $payment_id ); + $admin_message = give_do_email_tags( $admin_message, $payment_id ); + $attachments = apply_filters( 'give_offline_admin_donation_notification_attachments', array(), $payment_id ); $admin_headers = apply_filters( 'give_offline_admin_donation_notification_headers', array(), $payment_id ); From 2a0c24d739f856d9b77fba937cd0e86a8a8f8296 Mon Sep 17 00:00:00 2001 From: Ben Meredith Date: Mon, 8 Aug 2016 15:44:26 -0400 Subject: [PATCH 2/2] update readme for fix of #846 --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index ccb2b3e122..df767f6d0a 100644 --- a/readme.txt +++ b/readme.txt @@ -165,6 +165,7 @@ We also really like WooCommerce. It's hands-down the most robust eCommerce platf == Changelog == = 1.6: = +* New: Added email tag support to Offline Donation Admin Notification - https://github.com/WordImpress/Give/issues/846 * New: Added a "Reset Password" option to the donation form if the user is prompted to login - https://github.com/WordImpress/Give/issues/723 * New: Switch a transaction to a different form - https://github.com/WordImpress/Give/issues/429 * New: Setting to adjust the number of decimal spaces - https://github.com/WordImpress/Give/issues/738