Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipokkel/2be352933ac31ba423dcb2cb8f10d643 to your computer and use it in GitHub Desktop.
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.
<?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