better handling of init acf field
This commit is contained in:
@@ -128,6 +128,7 @@ function handle_prof_account_deletion_CIPF($user_id) {
|
||||
function handle_reminders_before_card_expire_CIPF($user_id) {
|
||||
Plgntls::debug_infos();
|
||||
$card_reminders = Cipf::DURATION_REMINDERS_BEFORE_ACCOUNT_EXPIRE;
|
||||
$emails_reminders = Cipf:: ACF_EMAILS_REMINDERS;
|
||||
|
||||
if (!isset_acf_card_expiration_CIPF($user_id)) {
|
||||
return;
|
||||
@@ -151,9 +152,9 @@ function handle_reminders_before_card_expire_CIPF($user_id) {
|
||||
|
||||
$diff = abs($current_date_diff - $date_diff);
|
||||
|
||||
if ($diff === 0)) {
|
||||
send_emails_CIPF('card_will_expire', $user_id);
|
||||
return; // don't send multiple emails
|
||||
if ($diff === 0) {
|
||||
// send_emails_CIPF('card_will_expire', $user_id);
|
||||
// return; // don't send multiple emails
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -196,8 +197,8 @@ function handle_reminders_before_account_deleted_CIPF($user_id) {
|
||||
|
||||
// i add +3 in case there is a difference of maximum 3 days between a 31 days month and a 28 days february
|
||||
if (abs($current_date_diff) <= (abs($date_diff) + 3)) {
|
||||
send_emails_CIPF('account_will_be_deleted', $user_id);
|
||||
return; // don't send multiple emails
|
||||
// send_emails_CIPF('account_will_be_deleted', $user_id);
|
||||
// return; // don't send multiple emails
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user