- Updates default cron trigger method in Populator and Settings
This commit is contained in:
@ -78,7 +78,7 @@ class Populator {
|
|||||||
if(!Setting::getValue(CronTrigger::SETTING_NAME)) {
|
if(!Setting::getValue(CronTrigger::SETTING_NAME)) {
|
||||||
// disable task scheduler (cron) be default
|
// disable task scheduler (cron) be default
|
||||||
Setting::setValue(CronTrigger::SETTING_NAME, array(
|
Setting::setValue(CronTrigger::SETTING_NAME, array(
|
||||||
'method' => 'WordPress'
|
'method' => CronTrigger::DEFAULT_METHOD
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ class CronTrigger {
|
|||||||
'mailpoet' => 'MailPoet',
|
'mailpoet' => 'MailPoet',
|
||||||
'wordpress' => 'WordPress'
|
'wordpress' => 'WordPress'
|
||||||
);
|
);
|
||||||
|
const DEFAULT_METHOD = 'WordPress';
|
||||||
const SETTING_NAME = 'cron_trigger';
|
const SETTING_NAME = 'cron_trigger';
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace MailPoet\Models;
|
namespace MailPoet\Models;
|
||||||
|
|
||||||
|
use MailPoet\Cron\CronTrigger;
|
||||||
|
|
||||||
if(!defined('ABSPATH')) exit;
|
if(!defined('ABSPATH')) exit;
|
||||||
|
|
||||||
class Setting extends Model {
|
class Setting extends Model {
|
||||||
@ -38,8 +40,8 @@ class Setting extends Model {
|
|||||||
'interval' => self::DEFAULT_SENDING_FREQUENCY_INTERVAL
|
'interval' => self::DEFAULT_SENDING_FREQUENCY_INTERVAL
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'task_scheduler' => array(
|
CronTrigger::SETTING_NAME => array(
|
||||||
'method' => 'WordPress'
|
'method' => CronTrigger::DEFAULT_METHOD
|
||||||
),
|
),
|
||||||
'signup_confirmation' => array(
|
'signup_confirmation' => array(
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
|
Reference in New Issue
Block a user