Skip to content

Commit

Permalink
TMS-1075: events-list query fix (#22)
Browse files Browse the repository at this point in the history
* TMS-1075: events-list query fix

* PHPCS fix
  • Loading branch information
eebbi authored Oct 28, 2024
1 parent ef12ca9 commit 4e07f8b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning][semver].

## [Unreleased]

- TMS-1075: Redipress 2 query fix

## [1.3.1] - 2024-04-18

- TMS-1024: Add text after recurring manual event dates
Expand Down
22 changes: 13 additions & 9 deletions src/Models/page-combined-events-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,20 @@ protected function get_manual_events() : array {
'post_type' => PostType\ManualEvent::SLUG,
'posts_per_page' => 200, // phpcs:ignore
'meta_query' => [
'relation' => 'AND',
[
'key' => 'end_datetime',
'value' => date( 'Y-m-d' ),
'compare' => '>=',
'type' => 'DATE',
'relation' => 'AND',
'end_date_clause' => [
[
'key' => 'end_datetime',
'value' => date( 'Y-m-d' ),
'compare' => '>=',
'type' => 'DATE',
],
],
[
'key' => 'recurring_event',
'value' => 0,
'recurring_event_clause' => [
[
'key' => 'recurring_event',
'value' => 0,
],
],
],
];
Expand Down

0 comments on commit 4e07f8b

Please sign in to comment.