Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CMSP-1034] fix typo in tax_query #622

Merged
merged 9 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Changelog ##

### 2.5.3-dev ###
### 2.5.3 (April 24, 2024) ###
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should happen in release PR, not feature branch.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I branched off main and then went back and changed things when I realized my mistake. See ee583cf

* 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)]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bin/behat-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
jazzsequence marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion includes/class-solrpower-wp-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"grunt-wp-readme-to-markdown": "~2.1.0",
"node-sass": "^9.0.0"
}
}
}
7 changes: 4 additions & 3 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above this should be release pr but fine if you're shipping this manually.

* 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)]
Expand Down
3 changes: 1 addition & 2 deletions tests/phpunit/wp_query/test-tax-query.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ function test_wp_query_by_tax() {
),
);
$query = new WP_Query( $args );

$this->assertEquals( $p_id, $query->post->ID );
}

Expand Down Expand Up @@ -1319,4 +1318,4 @@ public function test_term_taxonomy_id_field_no_taxonomy() {
), $results2, 'Relation: AND; Operator: IN' );
}

}
}
Loading