Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function send_admin_notification($funder_id, $trans = false, $fund) {
- if($trans != false) {
- $donor = $trans['first_name'] . ' ' . $trans['last_name'];
- $donation_amount = $this->format_currency('',$trans['gross'], 1);
- $donor_email = $trans['payer_email'];
- $recurring = 'One-Time';
- if(isset($trans['cycle'])) {
- $recurring = $trans['cycle'];
- }
- $to = the_author_meta( 'user_email', $funder_id )
- $subject = "Donation Received from " . $donor;
- $headers = 'From: "Fundraising" <none@none.none>';
- $message = "We have received a new donation from " . $donor . "!\n";
- $message .= "Amount: " . $donation_amount . "\n";
- $message .= "Fund: " . $fund . "\n";
- $message .= "Donor Email: " . $donor_email . "\n";
- $message .= "Recurrence: " . $recurring;
- //send email notification
- wp_mail($to, $subject, $message, $headers);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement