File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -399,13 +399,23 @@ public function delete_failed( $args, $assoc_args ) {
399399
400400 }
401401
402+ /**
403+ * Retrieve the failed tasks within a given queue
404+ *
405+ * @param string $queue Name of the queue to retrieve failed tasks for
406+ *
407+ * @return \WP_Query
408+ * @access private
409+ */
402410 private function get_failed_tasks ( $ queue ) {
403411
404412 $ args = [
405413 'post_type ' => self ::POST_TYPE ,
406414 'posts_per_page ' => 999 ,
407415 'fields ' => 'ids ' ,
408416 'no_found_rows ' => true ,
417+ 'order ' => 'ASC ' ,
418+ 'orderby ' => 'date ' ,
409419 'tax_query ' => [
410420 [
411421 'taxonomy ' => self ::TAXONOMY ,
@@ -415,8 +425,7 @@ private function get_failed_tasks( $queue ) {
415425 ],
416426 ];
417427
418- $ tasks = new \WP_Query ( $ args );
419- return $ tasks ;
428+ return new \WP_Query ( $ args );
420429
421430 }
422431
You can’t perform that action at this time.
0 commit comments