Created
August 17, 2018 09:22
-
-
Save andrewlimaza/4718abaadd408f081ed4b16aaa169afa to your computer and use it in GitHub Desktop.
Change when recurring payment reminders are sent for Paid Memberships Pro.
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 | |
/** | |
* 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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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/