Created
April 25, 2018 14:25
-
-
Save greenhornet79/57be0d237ed28e8eacd1ea1b20e34edc 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 to XXXX Publication has failed'; | |
| $body = 'We are sorry to inform you that your attempt at payment for XXXX Publication has failed. Please <a href="https://yourdomain.com/my-account/">log in to your account</a> on XXXX Publication and update your credit card information.'; | |
| $headers = array('Content-Type: text/html; charset=UTF-8','From: XXXX Publication <[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