woocommerce_rest_query_var-(var) filter-hookWC 1.0

Filter the query_vars used in get_items for the constructed query.

The dynamic portion of the hook name, $var, refers to the query_var key.

Usage

add_filter( 'woocommerce_rest_query_var-(var)', 'wp_kama_woocommerce_rest_query_var_filter' );

/**
 * Function for `woocommerce_rest_query_var-(var)` filter-hook.
 * 
 * @param mixed $prepared_args[ $var ] The query_var value.
 *
 * @return mixed
 */
function wp_kama_woocommerce_rest_query_var_filter( $prepared_args[ ){

	// filter...
	return $prepared_args[;
}
$prepared_args[(mixed)
$var ] The query_var value.

Where the hook is called

WC_REST_Posts_Controller::prepare_items_query()
woocommerce_rest_query_var-(var)
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-posts-controller.php 523
$query_args[ $var ] = apply_filters( "woocommerce_rest_query_var-{$var}", $prepared_args[ $var ] );

Where the hook is used in WooCommerce

Usage not found.