woocommerce_rest_refunds_prepare_object_query
Filter the query arguments for a request.
Enables adding extra arguments or setting defaults for an order collection request.
Usage
add_filter( 'woocommerce_rest_refunds_prepare_object_query', 'wp_kama_woocommerce_rest_refunds_prepare_object_query_filter', 10, 2 ); /** * Function for `woocommerce_rest_refunds_prepare_object_query` filter-hook. * * @param array $args Key value array of query var to query value. * @param WP_REST_Request $request The request used. * * @return array */ function wp_kama_woocommerce_rest_refunds_prepare_object_query_filter( $args, $request ){ // filter... return $args; }
- $args(array)
- Key value array of query var to query value.
- $request(WP_REST_Request)
- The request used.
Changelog
Since 9.0.0. | Introduced. |
Where the hook is called
woocommerce_rest_refunds_prepare_object_query
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-refunds-controller.php 82
$args = apply_filters( 'woocommerce_rest_refunds_prepare_object_query', $args, $request );