woocommerce_product_pre_search_products

woocommerce_product_pre_search_products

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

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_product_pre_search_products') is found 1 times:

  • /includes/data-stores/class-wc-product-data-store-cpt.php line 1781
    	 */
    	public function search_products( $term, $type = '', $include_variations = false, $all_statuses = false, $limit = null, $include = null, $exclude = null ) {
    		global $wpdb;
    
    		$custom_results = apply_filters( 'woocommerce_product_pre_search_products', false, $term, $type, $include_variations, $all_statuses, $limit );
    
    		if ( is_array( $custom_results ) ) {
    			return $custom_results;
    		}
    
    		$post_types   = $include_variations ? array( 'product', 'product_variation' ) : array( 'product' );