From e6a40d6bf282e5bdd17059e12c15ca90ccda6cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20L=C3=B6ytynoja?= Date: Wed, 30 Oct 2024 14:57:15 +0200 Subject: [PATCH 1/2] Expirator bugfix --- lib/Expirator.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Expirator.php b/lib/Expirator.php index c0ab7f86..cd792321 100644 --- a/lib/Expirator.php +++ b/lib/Expirator.php @@ -21,9 +21,7 @@ class Expirator { * @return void */ public static function expirate() { - $args = [ - 'fields' => 'ids', 'post_type' => TreduEvent::SLUG, 'post_status' => 'publish', 'update_post_term_cache' => false, @@ -31,6 +29,7 @@ public static function expirate() { ]; $query = new \WP_Query( $args ); + $ids = \wp_list_pluck( $query->posts, 'ID' ); // Current time. $now = \current_time( 'mysql' ); @@ -58,7 +57,7 @@ public static function expirate() { \wp_update_post( $post_object ); } } - }, $query->posts ); + }, $ids ); } } From 984a54384706d23ad198659b7e7e68d350643cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20V=C3=A4nttinen?= Date: Wed, 6 Nov 2024 10:20:03 +0200 Subject: [PATCH 2/2] TMS-1075: Update changelog --- CHANGELOG.MD | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.MD b/CHANGELOG.MD index f2c277cd..197e445b 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +- TMS-1075: Fix expirator bug + ## [1.9.0] - 2024-10-24 - TMS-1075: Redipress 2 filters