Enforce loop_shop_post_in array

This commit is contained in:
Mike Jolley 2016-10-24 07:51:48 +01:00
parent edd14cd8df
commit 83aa330621
1 changed files with 1 additions and 1 deletions

View File

@ -392,7 +392,7 @@ class WC_Query {
$q->set( 'tax_query', $this->get_tax_query( $q->get( 'tax_query' ) ) );
$q->set( 'posts_per_page', $q->get( 'posts_per_page' ) ? $q->get( 'posts_per_page' ) : apply_filters( 'loop_shop_per_page', get_option( 'posts_per_page' ) ) );
$q->set( 'wc_query', 'product_query' );
$q->set( 'post__in', array_unique( apply_filters( 'loop_shop_post_in', array() ) ) );
$q->set( 'post__in', array_unique( (array) apply_filters( 'loop_shop_post_in', array() ) ) );
do_action( 'woocommerce_product_query', $q, $this );
}