Automattic\WooCommerce\Internal\RestApi\Routes\V4
AbstractController::get_collection_params
Add default context collection params and filter the result. This does not inherit from WP_REST_Controller::get_collection_params because some endpoints do not paginate results.
Method of the class: AbstractController{}
Hooks from the method
Returns
Array.
Usage
$AbstractController = new AbstractController(); $AbstractController->get_collection_params();
AbstractController::get_collection_params() AbstractController::get collection params code WC 10.4.3
public function get_collection_params() {
$params = $this->get_query_schema();
$params['context'] = $this->get_context_param( array( 'default' => 'view' ) );
/**
* Filter the collection params.
*
* @param array $params The collection params.
* @since 10.2.0
*/
return apply_filters( $this->get_hook_prefix() . 'collection_params', $params, $this );
}