woocommerce_hpos_pre_query

woocommerce_hpos_pre_query

Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.2.3

apply_filters('woocommerce_hpos_pre_query') is found 1 times:

  • /src/Internal/DataStores/Orders/OrdersTableQuery.php line 233
    		 * }
    		 * @param OrdersTableQuery   $query The OrdersTableQuery instance.
    		 * @param string             $sql The OrdersTableQuery instance.
    		 */
    		$pre_query = apply_filters( 'woocommerce_hpos_pre_query', null, $this, $this->sql );
    		if ( ! $pre_query || ! isset( $pre_query[0] ) || ! is_array( $pre_query[0] ) ) {
    			return false;
    		}
    
    		// If the filter set the orders, make sure the others values are set as well and skip running the query.
    		list( $this->orders, $this->found_orders, $this->max_num_pages ) = $pre_query;