Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Last active November 21, 2023 14:23
Show Gist options
  • Save andrewlimaza/3fc9e3a5141420e1e74be33613cadb58 to your computer and use it in GitHub Desktop.
Save andrewlimaza/3fc9e3a5141420e1e74be33613cadb58 to your computer and use it in GitHub Desktop.
Adjust trial ending email to be closer to the time [Paid Memberships Pro]
<?php
/**
* Send trial ending/Expiring soon emails 3 days.
* Add this code to your Code Snippet/Custom Plugin - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_pmpro_adjust_trial_ending_email( $days ) {
return 3;
}
add_filter( 'pmpro_email_days_before_trial_end', 'my_pmpro_adjust_trial_ending_email', 10, 1 ); // Trial Ending Soon Emails
add_filter( 'pmpro_email_days_before_expiration', 'my_pmpro_adjust_trial_ending_email', 10, 1 ); // Expiring Soon Emails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment