Skip to content

Instantly share code, notes, and snippets.

@MrVibe
Last active November 19, 2018 17:46
Show Gist options
  • Save MrVibe/c6c2b781e7553b835818e00bcde26d8f to your computer and use it in GitHub Desktop.
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.
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