WC_REST_Report_Customers_Totals_Controller::get_item_schema()
Get the Report's schema, conforming to JSON Schema.
Method of the class: WC_REST_Report_Customers_Totals_Controller{}
No Hooks.
Return
Array
.
Usage
$WC_REST_Report_Customers_Totals_Controller = new WC_REST_Report_Customers_Totals_Controller(); $WC_REST_Report_Customers_Totals_Controller->get_item_schema();
WC_REST_Report_Customers_Totals_Controller::get_item_schema() WC REST Report Customers Totals Controller::get item schema code WC 9.5.1
public function get_item_schema() { $schema = array( '$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'report_customer_total', 'type' => 'object', 'properties' => array( 'slug' => array( 'description' => __( 'An alphanumeric identifier for the resource.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'name' => array( 'description' => __( 'Customer type name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'total' => array( 'description' => __( 'Amount of customers.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), ), ); return $this->add_additional_fields_schema( $schema ); }