added email when account is deleted

This commit is contained in:
asus
2024-04-09 20:47:17 +02:00
parent e48eb9cb51
commit 364553612a
2 changed files with 12 additions and 13 deletions

View File

@@ -4,7 +4,7 @@ Plugin Name: hggg_cipf
Plugin URI:
Description:
Author: hugogogo
Version: 0.5.7
Version: 0.5.6
Author URI:
*/
@@ -216,16 +216,6 @@ contactez la fipf directement",
'confirmation_subject'=>"[CIPF - paiement changement carte réussi]",
'confirmation_message'=>"paiement changement carte réussi",
],
'account_deleted'=>[
'name'=>'prof - le compte a été supprimé',
'notification_send'=>true,
'notification_to'=>'$$__admin_email__$$',
'notification_subject'=>"[CIPF /prof - compte supprimé]",
'notification_message'=>'compte supprimé pour $$user_login$$ : $$__author_page_url__$$',
'confirmation_send'=>true,
'confirmation_subject'=>"[CIPF - compte supprimé]",
'confirmation_message'=>'votre compte a été supprimé sur $$__base_url__$$',
],
'account_will_expire'=>[
'name'=>'prof - la carte va bientot expirer',
'notification_send'=>true,
@@ -246,6 +236,16 @@ contactez la fipf directement",
'confirmation_subject'=>"[CIPF - carte expirée]",
'confirmation_message'=>'votre carte a expiré, renouvelez-la sur $$__base_url__$$',
],
'account_deleted'=>[
'name'=>'prof - le compte a été supprimé',
'notification_send'=>true,
'notification_to'=>'$$__admin_email__$$',
'notification_subject'=>"[CIPF /prof - compte supprimé]",
'notification_message'=>'compte supprimé pour $$user_login$$ : $$__author_page_url__$$',
'confirmation_send'=>true,
'confirmation_subject'=>"[CIPF - compte supprimé]",
'confirmation_message'=>'votre compte a été supprimé sur $$__base_url__$$',
],
'offer_will_expire'=>[
'name'=>"partenaire - l'offre arrive bientot a expiration",
'notification_send'=>true,

View File

@@ -114,11 +114,10 @@ function handle_prof_account_deletion_CIPF($user_id) {
*
*/
if (!is_prof_account_deletion_date_exceeded_CIPF($user_id)) {
error_log("dont delete yet");
return;
}
error_log("delete now !");
send_emails_CIPF('account_deleted', $user_id);
include_once(ABSPATH.'wp-admin/includes/user.php');
wp_delete_user($user_id);
}