Skip to content

Commit 068576a

Browse files
authored
Merge branch 'master' into TMS-1075-fix
2 parents 305c416 + 70d7dc2 commit 068576a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.MD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
88
## [Unreleased]
99

1010
- TMS-1075-fix: Program page query fix
11+
- TMS-1075: Fix expirator bug
1112

1213
## [1.9.0] - 2024-10-24
1314

lib/Expirator.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@ class Expirator {
2121
* @return void
2222
*/
2323
public static function expirate() {
24-
2524
$args = [
26-
'fields' => 'ids',
2725
'post_type' => TreduEvent::SLUG,
2826
'post_status' => 'publish',
2927
'update_post_term_cache' => false,
3028
'posts_per_page' => -1,
3129
];
3230

3331
$query = new \WP_Query( $args );
32+
$ids = \wp_list_pluck( $query->posts, 'ID' );
3433

3534
// Current time.
3635
$now = \current_time( 'mysql' );
@@ -58,7 +57,7 @@ public static function expirate() {
5857
\wp_update_post( $post_object );
5958
}
6059
}
61-
}, $query->posts );
60+
}, $ids );
6261
}
6362
}
6463

0 commit comments

Comments
 (0)