woocommerce_customer_search_customers filter-hook . WC 1.0
Usage
add_filter( 'woocommerce_customer_search_customers', 'filter_function_name_5461', 10, 4 ); function filter_function_name_5461( $array, $term, $limit, $string ){ // filter... return $array; }
- $array
- -
- $term
- -
- $limit
- -
- $string
- -
Where the hook is called
woocommerce_customer_search_customers
woocommerce/includes/data-stores/class-wc-customer-data-store.php 455-466
apply_filters( 'woocommerce_customer_search_customers', array( 'search' => '*' . esc_attr( $term ) . '*', 'search_columns' => array( 'user_login', 'user_url', 'user_email', 'user_nicename', 'display_name' ), 'fields' => 'ID', 'number' => $limit, ), $term, $limit, 'main_query' )
woocommerce/includes/data-stores/class-wc-customer-data-store.php 470-492
apply_filters( 'woocommerce_customer_search_customers', array( 'fields' => 'ID', 'number' => $limit, 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'first_name', 'value' => $term, 'compare' => 'LIKE', ), array( 'key' => 'last_name', 'value' => $term, 'compare' => 'LIKE', ), ), ), $term, $limit, 'meta_query' )