Last active
November 19, 2018 17:46
-
-
Save MrVibe/c6c2b781e7553b835818e00bcde26d8f to your computer and use it in GitHub Desktop.
Add more schedule options for Course expiry email. Like notify student 30 days in advance.
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
add_filter('wplms_email_schedule',function($settings){ | |
foreach($settings as $i=>$setting){ | |
if($setting['name']==='expire_schedule'){ | |
$hours = 30*24; | |
$settings[$i]['options'][$hours]='Before 30 days of course expiry'; | |
$settings[$i]['options'][$hours*2]='Before 60 days of course expiry'; | |
$settings[$i]['options'][$hours*3]='Before 90 days of course expiry'; | |
} | |
} | |
return $settings; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment