woocommerce_json_search_found_customers filter-hookWC 7.2.0

Filter to customize the display of the currently selected customer for an order in the order edit page. This is the same filter used in the ajax call for customer search in the same metabox.

Usage

add_filter( 'woocommerce_json_search_found_customers', 'wp_kama_woocommerce_json_search_found_customers_filter' );

/**
 * Function for `woocommerce_json_search_found_customers` filter-hook.
 * 
 * @param array $array @user_info An array containing one item with the name and email of the user currently selected as the customer for the order.
 *
 * @return array
 */
function wp_kama_woocommerce_json_search_found_customers_filter( $array ){

	// filter...
	return $array;
}
$array(array)
@user_info An array containing one item with the name and email of the user currently selected as the customer for the order.

Changelog

Since 7.2.0 Introduced.
Since 7.2.0 (this instance of the filter)

Where the hook is called

WC_Meta_Box_Order_Data::output()
woocommerce_json_search_found_customers
WC_AJAX::json_search_customers()
woocommerce_json_search_found_customers
woocommerce/includes/admin/meta-boxes/class-wc-meta-box-order-data.php 385
<option value="<?php echo esc_attr( $user_id ); ?>" selected="selected"><?php echo esc_html( htmlspecialchars( wp_kses_post( current( apply_filters( 'woocommerce_json_search_found_customers', array( $user_string ) ) ) ) ) ); ?></option>
woocommerce/includes/class-wc-ajax.php 1791
wp_send_json( apply_filters( 'woocommerce_json_search_found_customers', $found_customers ) );

Where the hook is used in WooCommerce

Usage not found.