Custom duration for Schedule mails

WPLMS has an option for scheduling Course Expiry and Drip feed Unit availability emails. However, the options available in the theme only allow up to a 24 hour period before which the user can be notified by sending the emails about the action.

This tip would enable adding more options to the schedule emails section.

 

Add this code in the Child theme functions.php

add_filter('wplms_email_schedule','mycustom_wplms_email_schedule');
function mycustom_wplms_email_schedule($args){
    //Change 5 to 2 for Drip feed email schedule
    if(!empty($args) && !empty($args[5]) && !empty($args[5]['options'])) {
        $args[5]['options'][168] = 'Before 1 Week of Course expiry';
        $args[5]['options'][336] = 'Before 2 Weeks of Course expiry';
    }
    return $args;
}

 

Result :

Leave a Reply

Your email address will not be published. Required fields are marked *