woocommerce_rest_customer_query filter-hookWC 1.0

Filter arguments, before passing to WP_User_Query, when querying users via the REST API.


add_filter( 'woocommerce_rest_customer_query', 'wp_kama_woocommerce_rest_customer_query_filter', 10, 2 );

 * Function for `woocommerce_rest_customer_query` filter-hook.
 * @param array           $prepared_args Array of arguments for WP_User_Query.
 * @param WP_REST_Request $request       The current request.
 * @return array
function wp_kama_woocommerce_rest_customer_query_filter( $prepared_args, $request ){

	// filter...
	return $prepared_args;
Array of arguments for WP_User_Query.
The current request.

Where the hook is called

woocommerce/includes/rest-api/Controllers/Version1/class-wc-rest-customers-v1-controller.php 270
$prepared_args = apply_filters( 'woocommerce_rest_customer_query', $prepared_args, $request );

Where the hook is used in WooCommerce

Usage not found.