Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Created August 17, 2018 09:22
Show Gist options
  • Save andrewlimaza/4718abaadd408f081ed4b16aaa169afa to your computer and use it in GitHub Desktop.
Save andrewlimaza/4718abaadd408f081ed4b16aaa169afa to your computer and use it in GitHub Desktop.
Change when recurring payment reminders are sent for Paid Memberships Pro.
<?php
/**
* Send recurring subscription payment email reminder 14 days before subscription payment.
* Add this code to your PMPro Customizations Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_change_recurring_emails( $emails ) {
// Remove the email that is sent 7 days before subscription payment.
unset( $emails[7] );
// Set a new email
$emails[14] = 'membership_recurring';
return $emails;
}
add_filter( 'pmpro_upcoming_recurring_payment_reminder', 'my_pmpro_change_recurring_emails', 10, 1 );
@kimcoleman
Copy link

This recipe is included in the blog post on "Notify Members of Upcoming Recurring Payment / Automatic Renewal for Membership" at Paid Memberships Pro here: https://www.paidmembershipspro.com/notify-members-of-upcoming-recurring-payment-automatic-renewal-for-membership/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment