Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Filter the settings of email frequency and custom email template when using the Extra Expiration Warning Emails Add On
<?php
/**
* Filter the settings of email frequency and template sent when using the Extra Expiration Warning Emails Add On
* https://www.paidmembershipspro.com/add-ons/extra-expiration-warning-emails-add-on/
*
* Update the $settings array to your list of number of days => 'template_name'. The example below uses a custom
* email template added to your active theme in a new 'paid-memberships-pro/emails' custom folder.
* The email file name is listed without its .html extension.
*/
function custom_pmproeewe_email_frequency_and_templates( $settings = array() ) {
$settings = array(
10 => 'custom_membership_expiring',
30 => 'custom_membership_expiring',
60 => 'custom_membership_expiring_final',
);
return $settings;
}
add_filter( 'pmproeewe_email_frequency_and_templates', 'custom_pmproeewe_email_frequency_and_templates', 10, 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.