Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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