woocommerce_json_search_found_customers хук-фильтрWC 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.

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

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(массив)
@user_info An array containing one item with the name and email of the user currently selected as the customer for the order.

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

С версии 7.2.0 Введена.
С версии 7.2.0 (this instance of the filter)

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

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 1785
wp_send_json( apply_filters( 'woocommerce_json_search_found_customers', $found_customers ) );

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

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