WC_REST_Order_Notes_V2_Controller::get_collection_params()publicWC 1.0

Get the query params for collections.

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

Хуков нет.

Возвращает

Массив.

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

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

Код WC_REST_Order_Notes_V2_Controller::get_collection_params() WC 9.3.3

public function get_collection_params() {
	$params            = array();
	$params['context'] = $this->get_context_param( array( 'default' => 'view' ) );
	$params['type']    = array(
		'default'           => 'any',
		'description'       => __( 'Limit result to customers or internal notes.', 'woocommerce' ),
		'type'              => 'string',
		'enum'              => array( 'any', 'customer', 'internal' ),
		'sanitize_callback' => 'sanitize_key',
		'validate_callback' => 'rest_validate_request_arg',
	);

	return $params;
}