This file contains 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 | |
/* two actions | |
leaky_paywall_stripe_invoice_payment_succeeded | |
leaky_paywall_stripe_payment_intent_succeeded | |
*/ | |
add_action( 'leaky_paywall_stripe_invoice_payment_succeeded', 'zeen_send_renewal_email_notification', 10, 2 ); | |
function zeen_send_renewal_email_notification( $user, $stripe_object ) { | |
$to = 'admin@example.com'; | |
$subject = 'Renewal Payment Notification'; | |
$body = 'A renewal payment succeeded for' . $user->user_email; | |
$headers = array('Content-Type: text/html; charset=UTF-8','From: My Site Name <support@example.com'); | |
wp_mail( $to, $subject, $body, $headers ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment