Skip to content

Commit

Permalink
Merge pull request #1077 from crstauf/fix-1036
Browse files Browse the repository at this point in the history
`has_pending_actions_due()` performance improvements
  • Loading branch information
coreymckrill authored Oct 31, 2024
2 parents d686bbd + 578b623 commit 9c7b8ed
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions classes/abstracts/ActionScheduler_Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,12 @@ public function get_status_labels() {
public function has_pending_actions_due() {
$pending_actions = $this->query_actions(
array(
'date' => as_get_datetime_object(),
'status' => self::STATUS_PENDING,
'orderby' => 'none',
)
'per_page' => 1,
'date' => as_get_datetime_object(),
'status' => self::STATUS_PENDING,
'orderby' => 'none',
),
'count'
);

return ! empty( $pending_actions );
Expand Down

0 comments on commit 9c7b8ed

Please sign in to comment.