loop_shop_post_in

loop_shop_post_in

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('loop_shop_post_in') is found 1 times:

  • /includes/class-wc-query.php line 533
    		// Query vars that affect posts shown.
    		$q->set( 'meta_query', $this->get_meta_query( $q->get( 'meta_query' ), true ) );
    		$q->set( 'tax_query', $this->get_tax_query( $q->get( 'tax_query' ), true ) );
    		$q->set( 'wc_query', 'product_query' );
    		$q->set( 'post__in', array_unique( (array) apply_filters( 'loop_shop_post_in', array() ) ) );
    
    		// Work out how many products to query.
    		$q->set( 'posts_per_page', $q->get( 'posts_per_page' ) ? $q->get( 'posts_per_page' ) : apply_filters( 'loop_shop_per_page', wc_get_default_products_per_row() * wc_get_default_product_rows_per_page() ) );
    
    		// Store reference to this query.
    		self::$product_query = $q;