WC_REST_Orders_Controller::get_collection_params()publicWC 1.0

Get the query params for collections.

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

Хуков нет.

Возвращает

Массив.

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

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

Код WC_REST_Orders_Controller::get_collection_params() WC 8.7.0

public function get_collection_params() {
	$params = parent::get_collection_params();

	$params['status'] = array(
		'default'           => 'any',
		'description'       => __( 'Limit result set to orders which have specific statuses.', 'woocommerce' ),
		'type'              => 'array',
		'items'             => array(
			'type' => 'string',
			'enum' => array_merge( array( 'any', 'trash' ), $this->get_order_statuses() ),
		),
		'validate_callback' => 'rest_validate_request_arg',
	);

	return $params;
}