File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
8
8
## [ Unreleased]
9
9
10
10
- TMS-1075-fix: Program page query fix
11
+ - TMS-1075: Fix expirator bug
11
12
12
13
## [ 1.9.0] - 2024-10-24
13
14
Original file line number Diff line number Diff line change @@ -21,16 +21,15 @@ class Expirator {
21
21
* @return void
22
22
*/
23
23
public static function expirate () {
24
-
25
24
$ args = [
26
- 'fields ' => 'ids ' ,
27
25
'post_type ' => TreduEvent::SLUG ,
28
26
'post_status ' => 'publish ' ,
29
27
'update_post_term_cache ' => false ,
30
28
'posts_per_page ' => -1 ,
31
29
];
32
30
33
31
$ query = new \WP_Query ( $ args );
32
+ $ ids = \wp_list_pluck ( $ query ->posts , 'ID ' );
34
33
35
34
// Current time.
36
35
$ now = \current_time ( 'mysql ' );
@@ -58,7 +57,7 @@ public static function expirate() {
58
57
\wp_update_post ( $ post_object );
59
58
}
60
59
}
61
- }, $ query -> posts );
60
+ }, $ ids );
62
61
}
63
62
}
64
63
You can’t perform that action at this time.
0 commit comments