Forked from andrewlimaza/change-recurring-payment-reminder.php
Last active
April 8, 2021 18:49
-
-
Save travislima/982fa048441c00fbe4e6010a25a4799a to your computer and use it in GitHub Desktop.
Change when recurring payment reminders are sent for Paid Memberships Pro.
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 // Do not copy this PHP tag. | |
| /** | |
| * 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 day value. Currently set to send 14 days before subscription payment. | |
| $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/