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