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

Fix category slug used when doing cat Tax Query with ID #2322

Merged
merged 1 commit into from
Aug 20, 2021

Conversation

oscarssanchez
Copy link
Contributor

Description of the Change

Fixes #2242

As WordPress core sets the category_name parameter when performing a Tax Query if you are doing an id's search, this conflicts with this check EP does here: https://github.com/10up/ElasticPress/blob/develop/includes/classes/Indexable/Post/Post.php#L1003

This problem only applies to the category taxonomy.

Alternate Designs

Benefits

Possible Drawbacks

Verification Process

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Changelog Entry

@Rahmon Rahmon self-assigned this Aug 20, 2021
Copy link
Contributor

@Rahmon Rahmon left a comment

Choose a reason for hiding this comment

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

LGTM

@Rahmon Rahmon merged commit a796de7 into develop Aug 20, 2021
@Rahmon Rahmon deleted the fix/cat-slug-bug branch August 20, 2021 20:32
@felipeelia felipeelia added this to the 3.6.2 milestone Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Wrong results while filtering by category using 'tax_query'
3 participants