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

Remove old code that removed nested meta queries #2567

Merged
merged 2 commits into from
Feb 8, 2022

Conversation

oscarssanchez
Copy link
Contributor

@oscarssanchez oscarssanchez commented Jan 25, 2022

Description of the Change

It seems https://github.com/10up/ElasticPress/pull/2567/files#diff-f5aaa70470d85e353af0ee1d50c73f04d65e2c2a78336a7ac660ead2d8e61d27L542 is no longer needed and as a result is removing nested meta queries.

Closes #1812

Alternate Designs

Possible Drawbacks

Verification Process

1.- Have a meta query like the following:

$meta_query = array(
    array(
        array(
            'key' => 'key1',
            'value' => 'on',
        ),
        array(
            'key' => 'key2'
            'value' => 'off'
        ),
        'relation' => 'AND'
    ),
    array(
        'key' => 'key3',
        'value' => 'red',
    ),
    'relation' => 'OR',
);

2.- Verify debug bar
3.- Meta queryfor key2/off should not be removed

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.

Changelog Entry

Credits

Props @

@mckdemps mckdemps added this to the 4.0.0 milestone Jan 25, 2022
@oscarssanchez oscarssanchez changed the base branch from develop to 4.x.x January 25, 2022 18:18
@mckdemps mckdemps modified the milestones: 4.0.0, 4.0.0 (beta 2) Jan 25, 2022
@felipeelia felipeelia merged commit e342459 into 4.x.x Feb 8, 2022
@felipeelia felipeelia deleted the fix/nested-meta-query-handling branch February 8, 2022 22:21
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.

Meta queries after first meta query stripped from nested meta queries
3 participants