Forked from andrewlimaza/change-recurring-payment-reminder.php
Last active
June 17, 2020 23:30
-
-
Save ipokkel/2be352933ac31ba423dcb2cb8f10d643 to your computer and use it in GitHub Desktop.
Disable a recurring payment reminder email preventing it from being 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 | |
/** | |
* This recipe removes a specific recurring payment reminder. | |
* | |
* You can add this recipe to your site by creating a custom plugin | |
* or using the Code Snippets plugin available for free in the WordPress repository. | |
* Read this companion article for step-by-step directions on either method. | |
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_disable_recurring_emails( $emails ) { | |
unset( $emails[1] ); // Remove the email that is sent 1 day before subscription payment. | |
return $emails; | |
} | |
add_filter( 'pmpro_upcoming_recurring_payment_reminder', 'my_pmpro_disable_recurring_emails', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment