woocommerce_customer_pre_search_customers хук-фильтрWC 3.0.7

Search customers and return customer IDs.

Использование

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(строка)
Search term.
$limit
-

Список изменений

С версии 3.0.7 Введена.

Где вызывается хук

WC_Customer_Data_Store::search_customers()
woocommerce_customer_pre_search_customers
woocommerce/includes/data-stores/class-wc-customer-data-store.php 518
$results = apply_filters( 'woocommerce_customer_pre_search_customers', false, $term, $limit );

Где используется хук в WooCommerce

Использование не найдено.