Merge pull request #1689 from mailpoet/wp-functions

Encapsulating WP calls
This commit is contained in:
wxa
2018-12-27 11:05:08 +03:00
committed by GitHub
23 changed files with 146 additions and 97 deletions

View File

@@ -241,8 +241,11 @@ class Migration extends SimpleWorker {
return true;
}
static function getNextRunDate() {
static function getNextRunDate($wp = null) {
if(is_null($wp)) {
$wp = new WPFunctions();
}
// run migration immediately
return Carbon::createFromTimestamp(WPFunctions::currentTime('timestamp'));
return Carbon::createFromTimestamp($wp->currentTime('timestamp'));
}
}