woocommerce_rest_onboarding_profile_object_query
Filter the query arguments for a request.
Enables adding extra arguments or setting defaults for a post collection request.
Usage
add_filter( 'woocommerce_rest_onboarding_profile_object_query', 'wp_kama_woocommerce_rest_onboarding_profile_object_query_filter', 10, 2 );
/**
* Function for `woocommerce_rest_onboarding_profile_object_query` filter-hook.
*
* @param array $args Key value array of query var to query value.
* @param array $params The params sent in the request.
*
* @return array
*/
function wp_kama_woocommerce_rest_onboarding_profile_object_query_filter( $args, $params ){
// filter...
return $args;
}
- $args(array)
- Key value array of query var to query value.
- $params(array)
- The params sent in the request.
Changelog
| Since 6.5.0 | Introduced. |
Where the hook is called
woocommerce_rest_onboarding_profile_object_query
woocommerce/src/Admin/API/OnboardingProfile.php 400
$args = apply_filters( 'woocommerce_rest_onboarding_profile_object_query', $args, $params );