-
-
Save mintplugins/10948a6b070748063d5e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function pw_send_subscription_cancelled_to_admin( $sub_id, $subscription ) { | |
$email_to = '[email protected]'; | |
$subject = 'Subscription Cancelled'; | |
$message = 'Subscription cancelled for ' . $subscription->customer->email; | |
EDD()->emails->send( $email_to, $subject, $message ); | |
} | |
add_action( 'edd_subscription_cancelled', 'pw_send_subscription_cancelled_to_admin', 10, 2 ); | |
function pw_send_subscription_failed_to_admin( $subscription ) { | |
$email_to = '[email protected]'; | |
$subject = 'Failed Payment'; | |
$message = 'Failed payment from ' . $subscription->customer->email; | |
EDD()->emails->send( $email_to, $subject, $message ); | |
} | |
add_action( 'edd_recurring_payment_failed', 'pw_send_subscription_failed_to_admin', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment