Use post_ids terminology to reflect whats being queried

This commit is contained in:
Mike Jolley 2016-01-15 09:51:42 +00:00
parent 8702f806ad
commit 2c7501944b
1 changed files with 4 additions and 4 deletions

View File

@ -768,14 +768,14 @@ class WC_Query {
)
);
$posts = apply_filters( 'woocommerce_layered_nav_query_posts', get_posts( $args ), $args, $attribute, $value );
$post_ids = apply_filters( 'woocommerce_layered_nav_query_post_ids', get_posts( $args ), $args, $attribute, $value );
if ( ! is_wp_error( $posts ) ) {
if ( ! is_wp_error( $post_ids ) ) {
if ( sizeof( $matched_products_from_attribute ) > 0 || $filtered ) {
$matched_products_from_attribute = $data['query_type'] == 'or' ? array_merge( $posts, $matched_products_from_attribute ) : array_intersect( $posts, $matched_products_from_attribute );
$matched_products_from_attribute = $data['query_type'] == 'or' ? array_merge( $post_ids, $matched_products_from_attribute ) : array_intersect( $post_ids, $matched_products_from_attribute );
} else {
$matched_products_from_attribute = $posts;
$matched_products_from_attribute = $post_ids;
}
$filtered = true;