Abstract WP's current_time() function in the code base
This commit is contained in:
@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Models;
|
||||
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
if(!defined('ABSPATH')) exit;
|
||||
|
||||
class ScheduledTask extends Model {
|
||||
@ -34,7 +37,7 @@ class ScheduledTask extends Model {
|
||||
}
|
||||
|
||||
function complete() {
|
||||
$this->processed_at = current_time('mysql');
|
||||
$this->processed_at = WPFunctions::currentTime('mysql');
|
||||
$this->set('status', self::STATUS_COMPLETED);
|
||||
$this->save();
|
||||
return ($this->getErrors() === false && $this->id() > 0);
|
||||
|
Reference in New Issue
Block a user