Skip to content

Instantly share code, notes, and snippets.

@adewaleolaore
Forked from pippinsplugins/gist:4503579
Created January 11, 2013 07:52
Show Gist options
  • Save adewaleolaore/4508782 to your computer and use it in GitHub Desktop.
Save adewaleolaore/4508782 to your computer and use it in GitHub Desktop.
<?php
function pw_edd_send_email_on_pending( $payment_id, $payment_data ) {
// grab the gateway so we can only send on email for specific gateways
$gateway = isset( $_POST['edd-gateway'] ) ? $_POST['edd-gateway'] : '';
// TODO: replace "bacs" with your gateway ID
if( $gateway != 'bacs' )
return;
// TODO: Set your desired subject here
$subject = 'New Pending Bank Transfer';
$message = "A new pending transfer has been created.\n\n";
$message .= "From: {$payment_data['user_info']['first_name']} {$payment_data['user_info']['last_name']}\n\n";
$message .= "Email: {$payment_data['user_info']['email']}\n\n";
// $payment_data contains all of the information from the purchase, so add what you want
// TODO: set your email address
wp_mail( 'email@yourdomain.com', $subject, $message );
}
add_action( 'edd_insert_payment', 'pw_edd_send_email_on_pending', 10, 2 );
@Arda1601
Copy link

Hello,

I'm very interesting in your bank transfer methode and the customization for pending transfer with this code.
Would you help me to set it for my website?
It's a crowdfunding website based on donation for young startup.

It will be a great help to make this works.
I'm a newbie in coding.

Thanks
Arda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment