Skip to content

Commit

Permalink
Merge branch 'develop' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
felipeelia committed Mar 16, 2022
2 parents 1e6a8ee + 5242aea commit 736dd48
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased]

## [4.0.1] - 2022-03-16
**This is a security release affecting users running ElasticPress 4.0 with both the WooCommerce and Protected Content Features activated. Please update to the latest version of ElasticPress if the WooCommerce and Protected Content features are activated and you're using ElasticPress 4.0.**

### Security
- Orders belonging to all users loaded in the My Account WooCommerce page. Props [@tomburtless](https://github.com/tomburtless) and [@oscarssanchez](https://github.com/oscarssanchez) via [#2658](https://github.com/10up/ElasticPress/pull/2658).

## [4.0.0] - 2022-03-08

**ElasticPress 4.0 contains some important changes. Make sure to read these highlights before upgrading:**
Expand Down Expand Up @@ -1309,6 +1315,7 @@ This is a bug fix release with some filter additions.
- Initial plugin release

[Unreleased]: https://github.com/10up/ElasticPress/compare/trunk...develop
[4.0.1]: https://github.com/10up/ElasticPress/compare/4.0.0...4.0.1
[4.0.0]: https://github.com/10up/ElasticPress/compare/3.6.6...4.0.0
[3.6.6]: https://github.com/10up/ElasticPress/compare/3.6.5...3.6.6
[4.0.0-beta.1]: https://github.com/10up/ElasticPress/compare/3.6.5...4.0.0-beta.1
Expand Down
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ Thank you to all the people who have already contributed to this repository via
[Dian Fishekqi (@dianfishekqi)](https://github.com/dianfishekqi),
[@beazuadmin](https://github.com/beazuadmin),
[Jonathan Netek](https://www.linkedin.com/in/jonathan-netek/),
[Tom Burtless (@tomburtless)](https://github.com/tomburtless),
and
[@qazaqstan2025](https://github.com/qazaqstan2025).

Expand Down
4 changes: 2 additions & 2 deletions elasticpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: ElasticPress
* Plugin URI: https://github.com/10up/ElasticPress
* Description: A fast and flexible search and query engine for WordPress.
* Version: 4.0.0
* Version: 4.0.1
* Requires at least: 5.6
* Requires PHP: 7.0
* Author: 10up
Expand Down Expand Up @@ -32,7 +32,7 @@
define( 'EP_URL', plugin_dir_url( __FILE__ ) );
define( 'EP_PATH', plugin_dir_path( __FILE__ ) );
define( 'EP_FILE', plugin_basename( __FILE__ ) );
define( 'EP_VERSION', '4.0.0' );
define( 'EP_VERSION', '4.0.1' );

/**
* PSR-4-ish autoloading
Expand Down
24 changes: 24 additions & 0 deletions includes/classes/Indexable.php
Original file line number Diff line number Diff line change
Expand Up @@ -756,6 +756,30 @@ public function build_meta_query( $meta_queries ) {

foreach ( $meta_queries as $single_meta_query ) {

/**
* There is a strange case where meta_query looks like this:
* array(
* "something" => array(
* array(
* 'key' => ...
* ...
* )
* )
* )
*
* Somehow WordPress (WooCommerce) handles that case so we need to as well.
*
* @since 2.1
*/
if ( is_array( $single_meta_query ) && empty( $single_meta_query['key'] ) ) {
reset( $single_meta_query );
$first_key = key( $single_meta_query );

if ( is_array( $single_meta_query[ $first_key ] ) ) {
$single_meta_query = $single_meta_query[ $first_key ];
}
}

if ( ! empty( $single_meta_query['key'] ) ) {

$terms_obj = false;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "elasticpress",
"version": "4.0.0",
"version": "4.0.1",
"license": "GPL-2.0-or-later",
"description": "A fast and flexible search and query engine for WordPress.",
"devDependencies": {
Expand Down
9 changes: 8 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: 10up, tlovett1, vhauri, tott, oscarssanchez, cmmarslender
Tags: performance, slow, search, elasticsearch, fuzzy, facet, aggregation, searching, autosuggest, suggest, elastic, advanced search, woocommerce, related posts, woocommerce
Tested up to: 5.9.1
Stable tag: 4.0.0
Stable tag: 4.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -51,6 +51,13 @@ Please refer to [Github](https://github.com/10up/ElasticPress) for detailed usag

== Changelog ==

= 4.0.1 - 2022-03-16 =

**This is a security release affecting users running ElasticPress 4.0 with both the WooCommerce and Protected Content Features activated. Please update to the latest version of ElasticPress if the WooCommerce and Protected Content features are activated and you're using ElasticPress 4.0.**

Security:
* Orders belonging to all users loaded in the My Account WooCommerce page. Props [@tomburtless](https://github.com/tomburtless) and [@oscarssanchez](https://github.com/oscarssanchez).

= 4.0.0 - 2022-03-08 =

**ElasticPress 4.0 contains some important changes. Make sure to read these highlights before upgrading:**
Expand Down

0 comments on commit 736dd48

Please sign in to comment.