Created
August 25, 2017 12:23
-
-
Save greenhornet79/f71fdcdd32aa4a19cb5db12ea037dbf1 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
| <?php | |
| add_action( 'leaky_paywall_failed_payment', 'zeen101_send_payment_failed_notification' ); | |
| function zeen101_send_payment_failed_notification( $user ) { | |
| $to = $user->user_email; | |
| $subject = 'Your payment has failed'; | |
| $body = 'We are sorry to inform you that your attempt at payment has failed. Please <a href="https://examplesite.com/my-account/">log in to your account</a> on Example Site and update your credit card information.'; | |
| $headers = array('Content-Type: text/html; charset=UTF-8','From: Example Site <[email protected]>'); | |
| wp_mail( $to, $subject, $body, $headers ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment