woocommerce_customer_pre_search_customers
Search customers and return customer IDs.
Usage
add_filter( 'woocommerce_customer_pre_search_customers', 'wp_kama_woocommerce_customer_pre_search_customers_filter', 10, 2 ); /** * Function for `woocommerce_customer_pre_search_customers` filter-hook. * * @param string $term Search term. * @param $limit * * @return string */ function wp_kama_woocommerce_customer_pre_search_customers_filter( $term, $limit ){ // filter... return $term; }
- $term(string)
- Search term.
- $limit
- -
Changelog
Since 3.0.7 | Introduced. |
Where the hook is called
woocommerce_customer_pre_search_customers
woocommerce/includes/data-stores/class-wc-customer-data-store.php 538
$results = apply_filters( 'woocommerce_customer_pre_search_customers', false, $term, $limit );