Add support for comma separated shorthand taxonomies#801
Conversation
| $integrate = true; | ||
|
|
||
| $terms = array( $term ); | ||
| $terms = explode( ',', $term ); |
There was a problem hiding this comment.
What if term is an array? Seems like we need to check that case too.
There was a problem hiding this comment.
Ah, sorry @tlovett1 - I cannot remember why I did not check if it was an array. I guess it's because the existing code assumes that it is a string.
But you're correct, there should be a check for "array".
I will correct it in the near future 👍
|
Sorry this took so long @tlovett1 - please take a look at it again |
| // If it is a string then we convert it to an array with one or more | ||
| // values to handle it with the same logic. | ||
| if ( is_string( $term ) ) { | ||
| $terms = explode( ',', $term ); |
There was a problem hiding this comment.
Seems like this only gets defined if it's a string
|
Brain fart time – great catch @tlovett1. It should be ready for merge, this time |
|
@lukaspawlik can you confirm that this have been fixed with your work in: 41f9f18 ? |
|
@tlovett1 @lukaspawlik I've finally updated some of our projects to the latest version of ElasticPress and discovered that this is still not covered. It's the same case as above. |
|
Thank you for your interest in contributing to ElasticPress. At the time of this writing, we are focusing our development efforts on version 3.0 in the |
The current implementation of handling "supported taxonomies" assumes that the
query_varargument is a single value (example:'product_brand' => 'adidas') - It does not support multiple terms separated by a comma (example:'product_brand' => 'adidas,nike').