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