diff --git a/app/Controllers/Notifications.php b/app/Controllers/Notifications.php index 2bcb66b3..b4c6a15e 100755 --- a/app/Controllers/Notifications.php +++ b/app/Controllers/Notifications.php @@ -617,6 +617,7 @@ class Notifications extends BaseController $schemename = $row['title']; $expirydate = $row['to_subscription']; $customerId = $row['customer_id']; + $countdays = $row['countdays']; $membership_id = $row['membership_id']; if (empty($fullName)) { $this->logger->error('There is no subcription Name'); @@ -676,6 +677,8 @@ class Notifications extends BaseController if (isset($expirydate)) { $expiryon = $expirydate ? date('d-m-Y', strtotime($expirydate)) : ''; $emailContent = str_replace("{EXPIRY_DATE}", $expiryon, $emailContent); + $replaceContent = (int)$countdays == 0 ? 'expires today, ' : 'expiring on '; + $emailContent = str_replace("expiring on", $replaceContent, $emailContent); } if (isset($membership_id)) { $emailContent = str_replace("{RENEWAL_LINK}", base_url() . 'subscription_renewal/' . $membership_id, $emailContent);