Update notification reminder conditions to allow for more flexible configuration
This commit is contained in:
parent
366ef73d57
commit
d8dbe68f51
@ -49,19 +49,19 @@ foreach ($d as $ds) {
|
||||
} else {
|
||||
$price = $p['price'];
|
||||
}
|
||||
if ($ds['expiration'] == $day7 && $config['notification_reminder_7day'] == 'yes') {
|
||||
if ($ds['expiration'] == $day7 && $config['notification_reminder_7day'] !== 'no') {
|
||||
try {
|
||||
echo Message::sendPackageNotification($c, $p['name_plan'], $price, Lang::getNotifText('reminder_7_day'), $config['user_notification_reminder']) . "\n";
|
||||
} catch (Exception $e) {
|
||||
sendTelegram("Cron Reminder failed to send 7-day reminder to " . $ds['username'] . " Error: " . $e->getMessage());
|
||||
}
|
||||
} else if ($ds['expiration'] == $day3 && $config['notification_reminder_3day'] == 'yes') {
|
||||
} else if ($ds['expiration'] == $day3 && $config['notification_reminder_3day'] !== 'no') {
|
||||
try {
|
||||
echo Message::sendPackageNotification($c, $p['name_plan'], $price, Lang::getNotifText('reminder_3_day'), $config['user_notification_reminder']) . "\n";
|
||||
} catch (Exception $e) {
|
||||
sendTelegram("Cron Reminder failed to send 3-day reminder to " . $ds['username'] . " Error: " . $e->getMessage());
|
||||
}
|
||||
} else if ($ds['expiration'] == $day1 && $config['notification_reminder_1day'] == 'yes') {
|
||||
} else if ($ds['expiration'] == $day1 && $config['notification_reminder_1day'] !== 'no') {
|
||||
try {
|
||||
echo Message::sendPackageNotification($c, $p['name_plan'], $price, Lang::getNotifText('reminder_1_day'), $config['user_notification_reminder']) . "\n";
|
||||
} catch (Exception $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user