mirror of
https://github.com/pronamic/woocommerce-subscriptions.git
synced 2025-10-10 11:32:54 +00:00
2.0.19
This commit is contained in:
@@ -16,7 +16,7 @@ class ActionScheduler_QueueCleaner {
|
||||
|
||||
public function delete_old_actions() {
|
||||
$lifespan = apply_filters( 'action_scheduler_retention_period', $this->month_in_seconds );
|
||||
$cutoff = new DateTime($lifespan.' seconds ago');
|
||||
$cutoff = as_get_datetime_object($lifespan.' seconds ago');
|
||||
|
||||
$actions_to_delete = $this->store->query_actions( array(
|
||||
'status' => ActionScheduler_Store::STATUS_COMPLETE,
|
||||
@@ -35,7 +35,7 @@ class ActionScheduler_QueueCleaner {
|
||||
if ( $timeout < 0 ) {
|
||||
return;
|
||||
}
|
||||
$cutoff = new DateTime($timeout.' seconds ago');
|
||||
$cutoff = as_get_datetime_object($timeout.' seconds ago');
|
||||
$actions_to_reset = $this->store->query_actions( array(
|
||||
'status' => ActionScheduler_Store::STATUS_PENDING,
|
||||
'modified' => $cutoff,
|
||||
@@ -55,7 +55,7 @@ class ActionScheduler_QueueCleaner {
|
||||
if ( $timeout < 0 ) {
|
||||
return;
|
||||
}
|
||||
$cutoff = new DateTime($timeout.' seconds ago');
|
||||
$cutoff = as_get_datetime_object($timeout.' seconds ago');
|
||||
$actions_to_reset = $this->store->query_actions( array(
|
||||
'status' => ActionScheduler_Store::STATUS_RUNNING,
|
||||
'modified' => $cutoff,
|
||||
|
Reference in New Issue
Block a user