mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-06-05 15:09:37 +09:00
31 lines
644 B
PHP
31 lines
644 B
PHP
<?php
|
|
|
|
namespace um\action_scheduler;
|
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
exit;
|
|
}
|
|
|
|
if ( ! class_exists( 'um\action_scheduler\Email' ) ) {
|
|
class Email {
|
|
|
|
public function __construct() {
|
|
add_action( 'um_send_deleted_user_email', array( $this, 'send_deleted_user_email' ), 10, 2 );
|
|
}
|
|
|
|
/**
|
|
* Send an email after user account was deleted.
|
|
*
|
|
* @param string $user_email User email.
|
|
* @param string $template Template name.
|
|
*/
|
|
public function send_deleted_user_email( $user_email, $template ) {
|
|
if ( empty( $user_email ) && empty( $template ) ) {
|
|
return;
|
|
}
|
|
|
|
UM()->mail()->send( $user_email, $template );
|
|
}
|
|
}
|
|
}
|