- added a few conditions and comments;

This commit is contained in:
Mykyta Synelnikov
2024-09-06 14:07:14 +03:00
parent 2d39dd6461
commit 5385e07a5f
3 changed files with 12 additions and 6 deletions
+7 -2
View File
@@ -1,5 +1,4 @@
<?php
namespace um\action_scheduler;
if ( ! defined( 'ABSPATH' ) ) {
@@ -7,6 +6,12 @@ if ( ! defined( 'ABSPATH' ) ) {
}
if ( ! class_exists( 'um\action_scheduler\Email' ) ) {
/**
* Class Email
*
* @package um\action_scheduler
*/
class Email {
public function __construct() {
@@ -17,7 +22,7 @@ if ( ! class_exists( 'um\action_scheduler\Email' ) ) {
* Send an email after user account was deleted.
*
* @param string $user_email User email.
* @param string $template Template name.
* @param string $template Template name.
*/
public function send_deleted_user_email( $user_email, $template ) {
if ( empty( $user_email ) && empty( $template ) ) {
-1
View File
@@ -1,5 +1,4 @@
<?php
namespace um\action_scheduler;
if ( ! defined( 'ABSPATH' ) ) {
+5 -3
View File
@@ -1,12 +1,11 @@
<?php
namespace um\action_scheduler;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'um\Action_Scheduler\Proxy' ) ) {
if ( ! class_exists( 'um\action_scheduler\Proxy' ) ) {
/**
* Class Action_Scheduler
@@ -24,7 +23,10 @@ if ( ! class_exists( 'um\Action_Scheduler\Proxy' ) ) {
* Action_Scheduler constructor.
*/
public function __construct() {
require_once UM_PATH . 'includes/lib/action-scheduler/action-scheduler.php';
$lib_path = UM_PATH . 'includes/lib/action-scheduler/action-scheduler.php';
if ( file_exists( $lib_path ) ) {
require_once UM_PATH . 'includes/lib/action-scheduler/action-scheduler.php';
}
}
/**