36 lines
669 B
PHP
36 lines
669 B
PHP
<?php
|
|
|
|
/*
|
|
* it means someone outside wp is accessing the file, in this case kill it.
|
|
*/
|
|
if (!defined('ABSPATH')) {
|
|
die('You can not access this file!');
|
|
}
|
|
|
|
|
|
|
|
|
|
function email_success_payment_CIPF($user_id) {
|
|
Plgntls::debug_infos();
|
|
error_log("in email success");
|
|
|
|
$user = get_user_by('id', $user_id);
|
|
$to = $user->user_email;
|
|
$subject = 'My Custom Email Subject';
|
|
$message = 'Hello, This is a test email sent from my WordPress plugin!';
|
|
$headers = array('Content-Type: text/html; charset=UTF-8');
|
|
|
|
$sent = wp_mail($to, $subject, $message, $headers);
|
|
|
|
// Check if the email was sent successfully
|
|
if (!$sent) {
|
|
error_log('Email sending failed!');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|