- Updates the name of the setting const
This commit is contained in:
@ -75,9 +75,9 @@ class Populator {
|
|||||||
private function createDefaultSettings() {
|
private function createDefaultSettings() {
|
||||||
$current_user = wp_get_current_user();
|
$current_user = wp_get_current_user();
|
||||||
|
|
||||||
if(!Setting::getValue(CronTrigger::SETTING_VALUE)) {
|
if(!Setting::getValue(CronTrigger::SETTING_NAME)) {
|
||||||
// disable task scheduler (cron) be default
|
// disable task scheduler (cron) be default
|
||||||
Setting::setValue(CronTrigger::SETTING_VALUE, array(
|
Setting::setValue(CronTrigger::SETTING_NAME, array(
|
||||||
'method' => CronTrigger::METHOD_WORDPRESS
|
'method' => CronTrigger::METHOD_WORDPRESS
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ if(!defined('ABSPATH')) exit;
|
|||||||
class CronTrigger {
|
class CronTrigger {
|
||||||
const METHOD_WORDPRESS = 'WordPress';
|
const METHOD_WORDPRESS = 'WordPress';
|
||||||
const METHOD_MAILPOET = 'MailPoet';
|
const METHOD_MAILPOET = 'MailPoet';
|
||||||
const SETTING_VALUE = 'cron_trigger';
|
const SETTING_NAME = 'cron_trigger';
|
||||||
|
|
||||||
function __construct() {
|
function __construct() {
|
||||||
$this->method = self::getCurrentMethod();
|
$this->method = self::getCurrentMethod();
|
||||||
|
@ -6,10 +6,10 @@ use MailPoet\Models\Setting;
|
|||||||
if(!defined('ABSPATH')) exit;
|
if(!defined('ABSPATH')) exit;
|
||||||
|
|
||||||
class MailerLog {
|
class MailerLog {
|
||||||
const SETTING_VALUE = 'mta_log';
|
const SETTING_NAME = 'mta_log';
|
||||||
|
|
||||||
static function getMailerLog() {
|
static function getMailerLog() {
|
||||||
$mailer_log = Setting::getValue(self::SETTING_VALUE);
|
$mailer_log = Setting::getValue(self::SETTING_NAME);
|
||||||
if(!$mailer_log) {
|
if(!$mailer_log) {
|
||||||
$mailer_log = self::createOrResetMailerLog();
|
$mailer_log = self::createOrResetMailerLog();
|
||||||
}
|
}
|
||||||
@ -21,12 +21,12 @@ class MailerLog {
|
|||||||
'sent' => 0,
|
'sent' => 0,
|
||||||
'started' => time()
|
'started' => time()
|
||||||
);
|
);
|
||||||
Setting::setValue(self::SETTING_VALUE, $mailer_log);
|
Setting::setValue(self::SETTING_NAME, $mailer_log);
|
||||||
return $mailer_log;
|
return $mailer_log;
|
||||||
}
|
}
|
||||||
|
|
||||||
static function updateMailerLog($mailer_log) {
|
static function updateMailerLog($mailer_log) {
|
||||||
Setting::setValue(self::SETTING_VALUE, $mailer_log);
|
Setting::setValue(self::SETTING_NAME, $mailer_log);
|
||||||
return $mailer_log;
|
return $mailer_log;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user