Automattic\WooCommerce\Internal\RestApi\Routes\V4

AbstractController::get_collection_paramspublicWC 1.0

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.

Метод класса: AbstractController{}

Хуки из метода

Возвращает

Массив.

Использование

$AbstractController = new AbstractController();
$AbstractController->get_collection_params();

Код AbstractController::get_collection_params() WC 11.0.1

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 );
}