WC_REST_Telemetry_Controller::get_collection_params
Get any query params needed.
Method of the class: WC_REST_Telemetry_Controller{}
No Hooks.
Returns
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() WC REST Telemetry Controller::get collection params code WC 10.3.6
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',
),
);
}