updated plugin WP Mail SMTP
version 2.3.1
This commit is contained in:
@ -23,6 +23,14 @@ class Tasks {
|
||||
*/
|
||||
public function init() {
|
||||
|
||||
// Hide the Action Scheduler admin menu item.
|
||||
add_action( 'admin_menu', array( $this, 'admin_hide_as_menu' ), PHP_INT_MAX );
|
||||
|
||||
// Skip tasks registration if Action Scheduler is not usable yet.
|
||||
if ( ! $this->is_usable() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Register tasks.
|
||||
foreach ( $this->get_tasks() as $task ) {
|
||||
if ( ! is_subclass_of( $task, '\WPMailSMTP\Tasks\Task' ) ) {
|
||||
@ -36,8 +44,6 @@ class Tasks {
|
||||
$new_task->init();
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'admin_menu', array( $this, 'admin_hide_as_menu' ), PHP_INT_MAX );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user