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.7.1

apply_filters('woocommerce_product_pre_search_products') is found 1 times:

  • /includes/data-stores/class-wc-product-data-store-cpt.php line 1869
    1865
    1866
    1867
    1868
    1869
    1870
    1871
    1872
    1873
    1874
    1875
    */
    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' );