diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d8d874b..01a2b5d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Changelog ## -### 2.5.3-dev ### +### 2.5.3 (April 24, 2024) ### +* Fixes a very old bug that would cause tax queries to be built incorrectly. [[#622](https://github.com/pantheon-systems/solr-power/pull/622)] (props [@offshorealert](https://wordpress.org/support/users/offshorealert/)) ### 2.5.2 (September 12, 2023) ### * Fix incompatibility with Object Cache Pro when running "wp solr index" [[#611](https://github.com/pantheon-systems/solr-power/pull/611)] diff --git a/README.md b/README.md index 4d80aa13..a1b9312b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ **Tags:** search **Requires at least:** 4.6 **Requires PHP:** 7.1 -**Tested up to:** 6.4.1 +**Tested up to:** 6.5.2 **Stable tag:** 2.5.3-dev **License:** GPLv2 or later **License URI:** http://www.gnu.org/licenses/gpl-2.0.html diff --git a/bin/behat-cleanup.sh b/bin/behat-cleanup.sh index 8f7e32ee..6d5077d4 100755 --- a/bin/behat-cleanup.sh +++ b/bin/behat-cleanup.sh @@ -20,4 +20,4 @@ set -ex ### # Delete the environment used for this test run. ### -terminus multidev:delete $SITE_ENV --delete-branch --yes +terminus multidev:delete $SITE_ENV --delete-branch --yes || true diff --git a/includes/class-solrpower-wp-query.php b/includes/class-solrpower-wp-query.php index f3b2d8e3..3ab9cc23 100644 --- a/includes/class-solrpower-wp-query.php +++ b/includes/class-solrpower-wp-query.php @@ -740,7 +740,7 @@ private function parse_tax_query( $tax_query ) { $multi_query = array(); $multi_query[] = '(' . $field . ':(' . implode( 'OR', $terms ) . '))'; if ( $tax_value['include_children'] && is_taxonomy_hierarchical( $tax_value['taxonomy'] ) ) { - $multi_query[] = '(parent_' . $field . ':' . implode( 'OR', $terms ) . ')'; + $multi_query[] = '(parent_' . $field . ':(' . implode( 'OR', $terms ) . '))'; } $query[] = '(' . implode( 'OR', $multi_query ) . ')'; break; diff --git a/package.json b/package.json index 83158623..1c6bb35f 100644 --- a/package.json +++ b/package.json @@ -23,4 +23,4 @@ "grunt-wp-readme-to-markdown": "~2.1.0", "node-sass": "^9.0.0" } -} \ No newline at end of file +} diff --git a/readme.txt b/readme.txt index 3841322b..1d38bb48 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: getpantheon, Outlandish Josh, 10up, collinsinternet, andrew.taylor Tags: search Requires at least: 4.6 Requires PHP: 7.1 -Tested up to: 6.4.1 -Stable tag: 2.5.2 +Tested up to: 6.5.2 +Stable tag: 2.5.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -235,7 +235,8 @@ Please report security bugs found in the source code of the Solr Power plugin th == Changelog == -= 2.5.3-dev = += 2.5.3 (April 24, 2024) = +* Fixes a very old bug that would cause tax queries to be built incorrectly. [[#622](https://github.com/pantheon-systems/solr-power/pull/622)] (props [@offshorealert](https://wordpress.org/support/users/offshorealert/)) = 2.5.2 (September 12, 2023) = * Fix incompatibility with Object Cache Pro when running "wp solr index" [[#611](https://github.com/pantheon-systems/solr-power/pull/611)] diff --git a/tests/phpunit/wp_query/test-tax-query.php b/tests/phpunit/wp_query/test-tax-query.php index 87417ce6..dd0589e0 100644 --- a/tests/phpunit/wp_query/test-tax-query.php +++ b/tests/phpunit/wp_query/test-tax-query.php @@ -29,7 +29,6 @@ function test_wp_query_by_tax() { ), ); $query = new WP_Query( $args ); - $this->assertEquals( $p_id, $query->post->ID ); } @@ -1319,4 +1318,4 @@ public function test_term_taxonomy_id_field_no_taxonomy() { ), $results2, 'Relation: AND; Operator: IN' ); } -} \ No newline at end of file +}