defined the emails
This commit is contained in:
@@ -153,8 +153,9 @@ vous allez être redirigés vers votre espace',
|
|||||||
'_name'=>'cipf_emails_option',
|
'_name'=>'cipf_emails_option',
|
||||||
'_callback'=>'update_emails_settings_option_CIPF',
|
'_callback'=>'update_emails_settings_option_CIPF',
|
||||||
'_default'=>[
|
'_default'=>[
|
||||||
|
// 1. profs : email : payment_success : validation payment prof reussi, send email
|
||||||
[
|
[
|
||||||
'action'=>'success_payment',
|
'action'=>'payment_success',
|
||||||
'notification_send'=>true,
|
'notification_send'=>true,
|
||||||
'notification_to'=>'$$__admin_email__$$',
|
'notification_to'=>'$$__admin_email__$$',
|
||||||
'notification_subject'=>"paiement réussi",
|
'notification_subject'=>"paiement réussi",
|
||||||
@@ -163,6 +164,94 @@ vous allez être redirigés vers votre espace',
|
|||||||
'confirmation_subject'=>"paiement réussi",
|
'confirmation_subject'=>"paiement réussi",
|
||||||
'confirmation_mesage'=>"donne l'argent",
|
'confirmation_mesage'=>"donne l'argent",
|
||||||
],
|
],
|
||||||
|
// 2. profs : email : payment_failure : validation payment prof echec, send email
|
||||||
|
[
|
||||||
|
'action'=>'payment_echec',
|
||||||
|
'notification_send'=>true,
|
||||||
|
'notification_to'=>'$$__admin_email__$$',
|
||||||
|
'notification_subject'=>"",
|
||||||
|
'notification_message'=>"",
|
||||||
|
'confirmation_send'=>true,
|
||||||
|
'confirmation_subject'=>"",
|
||||||
|
'confirmation_mesage'=>"",
|
||||||
|
],
|
||||||
|
// 3. profs : email : transfert_success : validation transfert prof reussi, send email
|
||||||
|
[
|
||||||
|
'action'=>'transfert_success',
|
||||||
|
'notification_send'=>true,
|
||||||
|
'notification_to'=>'$$__admin_email__$$',
|
||||||
|
'notification_subject'=>"",
|
||||||
|
'notification_message'=>"",
|
||||||
|
'confirmation_send'=>true,
|
||||||
|
'confirmation_subject'=>"",
|
||||||
|
'confirmation_mesage'=>"",
|
||||||
|
],
|
||||||
|
// 4. profs : email : transfert_failures : validation transfert prof echec, send email
|
||||||
|
[
|
||||||
|
'action'=>'transfert_echec',
|
||||||
|
'notification_send'=>true,
|
||||||
|
'notification_to'=>'$$__admin_email__$$',
|
||||||
|
'notification_subject'=>"",
|
||||||
|
'notification_message'=>"",
|
||||||
|
'confirmation_send'=>true,
|
||||||
|
'confirmation_subject'=>"",
|
||||||
|
'confirmation_mesage'=>"",
|
||||||
|
],
|
||||||
|
// 5. partners : email : offer_expired : offres temporaires -> gerer qu'elles disparaissent apres la date de validite -> la passer en masquer
|
||||||
|
[
|
||||||
|
'action'=>'offer_expired',
|
||||||
|
'notification_send'=>true,
|
||||||
|
'notification_to'=>'$$__admin_email__$$',
|
||||||
|
'notification_subject'=>"",
|
||||||
|
'notification_message'=>"",
|
||||||
|
'confirmation_send'=>true,
|
||||||
|
'confirmation_subject'=>"",
|
||||||
|
'confirmation_mesage'=>"",
|
||||||
|
],
|
||||||
|
// 6. partners : email : offer_will_expire : la gestion des offres à échéance
|
||||||
|
[
|
||||||
|
'action'=>'offer_will_expire',
|
||||||
|
'notification_send'=>true,
|
||||||
|
'notification_to'=>'$$__admin_email__$$',
|
||||||
|
'notification_subject'=>"",
|
||||||
|
'notification_message'=>"",
|
||||||
|
'confirmation_send'=>true,
|
||||||
|
'confirmation_subject'=>"",
|
||||||
|
'confirmation_mesage'=>"",
|
||||||
|
// 7. payments : email : account_deleted : schedule event pour supprimer le compte xx temps (6 mois ?) apres fin de validite de la carte
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'action'=>'account_deleted',
|
||||||
|
'notification_send'=>true,
|
||||||
|
'notification_to'=>'$$__admin_email__$$',
|
||||||
|
'notification_subject'=>"",
|
||||||
|
'notification_message'=>"",
|
||||||
|
'confirmation_send'=>true,
|
||||||
|
'confirmation_subject'=>"",
|
||||||
|
'confirmation_mesage'=>"",
|
||||||
|
],
|
||||||
|
// 8. payments : email : account_will_expire : faire rappels emails avant expiration
|
||||||
|
[
|
||||||
|
'action'=>'eccount_will_expire',
|
||||||
|
'notification_send'=>true,
|
||||||
|
'notification_to'=>'$$__admin_email__$$',
|
||||||
|
'notification_subject'=>"",
|
||||||
|
'notification_message'=>"",
|
||||||
|
'confirmation_send'=>true,
|
||||||
|
'confirmation_subject'=>"",
|
||||||
|
'confirmation_mesage'=>"",
|
||||||
|
],
|
||||||
|
// 9. payments : email : account_expired : desactiver carte expiree
|
||||||
|
[
|
||||||
|
'action'=>'account_expired',
|
||||||
|
'notification_send'=>true,
|
||||||
|
'notification_to'=>'$$__admin_email__$$',
|
||||||
|
'notification_subject'=>"",
|
||||||
|
'notification_message'=>"",
|
||||||
|
'confirmation_send'=>true,
|
||||||
|
'confirmation_subject'=>"",
|
||||||
|
'confirmation_mesage'=>"",
|
||||||
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -10,12 +10,50 @@ if (!defined('ABSPATH')) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* events and emails :
|
||||||
|
*
|
||||||
|
* 1. profs : email : payment_success : validation payment prof reussi, send email
|
||||||
|
* 2. profs : email : payment_failure : validation payment prof echec, send email
|
||||||
|
* 3. profs : email : transfert_success : validation transfert prof reussi, send email
|
||||||
|
* 4. profs : email : transfert_failures : validation transfert prof echec, send email
|
||||||
|
* 5. partners : email : offer_expired : offres temporaires -> gerer qu'elles disparaissent apres la date de validite -> la passer en masquer
|
||||||
|
* 6. partners : email : offer_will_expire : la gestion des offres à échéance
|
||||||
|
* 7. payments : email : account_deleted : schedule event pour supprimer le compte xx temps (6 mois ?) apres fin de validite de la carte
|
||||||
|
* 8. payments : email : account_will_expire : faire rappels emails avant expiration
|
||||||
|
* 9. payments : email : account_expired : desactiver carte expiree
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function email_success_payment_CIPF($user_id) {
|
function email_success_payment_CIPF($user_id) {
|
||||||
Plgntls::debug_infos();
|
Plgntls::debug_infos();
|
||||||
error_log("in email success");
|
error_log("in email success");
|
||||||
|
|
||||||
$user = get_user_by('id', $user_id);
|
$user = get_user_by('id', $user_id);
|
||||||
$to = $user->user_email;
|
// $to = $user->user_email;
|
||||||
|
$to = '$$__admin_email__$$';
|
||||||
$subject = 'My Custom Email Subject';
|
$subject = 'My Custom Email Subject';
|
||||||
$message = 'Hello, This is a test email sent from my WordPress plugin!';
|
$message = 'Hello, This is a test email sent from my WordPress plugin!';
|
||||||
$headers = array('Content-Type: text/html; charset=UTF-8');
|
$headers = array('Content-Type: text/html; charset=UTF-8');
|
||||||
|
|||||||
Reference in New Issue
Block a user