Enforce loop_shop_post_in array
This commit is contained in:
parent
edd14cd8df
commit
83aa330621
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue