Automattic\WooCommerce\Admin\API
OnboardingProfile::prepare_objects_query()
Prepare objects query.
Method of the class: OnboardingProfile{}
Hooks from the method
Return
Array
.
Usage
// protected - for code of main (parent) or child class $result = $this->prepare_objects_query( $params );
- $params(array) (required)
- The params sent in the request.
OnboardingProfile::prepare_objects_query() OnboardingProfile::prepare objects query code WC 9.7.1
protected function prepare_objects_query( $params ) { $args = array(); $properties = self::get_profile_properties(); foreach ( $properties as $key => $property ) { if ( isset( $params[ $key ] ) ) { $args[ $key ] = $params[ $key ]; } } /** * Filter the query arguments for a request. * * Enables adding extra arguments or setting defaults for a post * collection request. * * @since 6.5.0 * @param array $args Key value array of query var to query value. * @param array $params The params sent in the request. */ $args = apply_filters( 'woocommerce_rest_onboarding_profile_object_query', $args, $params ); return $args; }