mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-05-05 12:32:23 +08:00
https://github.com/impress-org/givewp-snippet-library/blob/master/email-customization/disable-donor-notification.php
13 lines
552 B
Text
13 lines
552 B
Text
function my123_give_remove_donor_notification( $payment_id ) {
|
|
remove_action( 'give_complete_donation', 'give_trigger_donation_receipt', 999, 1 );
|
|
|
|
//Remove these lines to stop triggering the admin notification.
|
|
$payment_data = give_get_payment_meta( $payment_id );
|
|
|
|
if ( give_is_setting_enabled( Give_Email_Notification::get_instance( 'new-donation' )->get_notification_status() ) ) {
|
|
do_action( 'give_admin_donation_email', $payment_id, $payment_data );
|
|
}
|
|
|
|
}
|
|
|
|
add_action( 'give_complete_donation', 'my123_give_remove_donor_notification', 1 );
|