WC_REST_Telemetry_Controller::get_collection_params()publicWC 1.0

Get any query params needed.

Method of the class: WC_REST_Telemetry_Controller{}

No Hooks.

Return

Array.

Usage

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

WC_REST_Telemetry_Controller::get_collection_params() code WC 8.7.0

public function get_collection_params() {
	return array(
		'platform'          => array(
			'description'       => __( 'Platform to track.', 'woocommerce' ),
			'required'          => true,
			'type'              => 'string',
			'sanitize_callback' => 'sanitize_text_field',
			'validate_callback' => 'rest_validate_request_arg',
		),
		'version'           => array(
			'description'       => __( 'Platform version to track.', 'woocommerce' ),
			'required'          => true,
			'type'              => 'string',
			'sanitize_callback' => 'sanitize_text_field',
			'validate_callback' => 'rest_validate_request_arg',
		),
		'installation_date' => array(
			'description'       => __( 'Installation date of the WooCommerce mobile app.', 'woocommerce' ),
			'required'          => false, // For backward compatibility.
			'type'              => 'string',
			'format'            => 'date-time',
			'validate_callback' => 'rest_validate_request_arg',
		),
	);
}