WC_REST_Report_Top_Sellers_V1_Controller::get_item_schema()
Get the Report's schema, conforming to JSON Schema.
Метод класса: WC_REST_Report_Top_Sellers_V1_Controller{}
Хуков нет.
Возвращает
Массив
.
Использование
$WC_REST_Report_Top_Sellers_V1_Controller = new WC_REST_Report_Top_Sellers_V1_Controller(); $WC_REST_Report_Top_Sellers_V1_Controller->get_item_schema();
Код WC_REST_Report_Top_Sellers_V1_Controller::get_item_schema() WC REST Report Top Sellers V1 Controller::get item schema WC 8.7.0
public function get_item_schema() { $schema = array( '$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'top_sellers_report', 'type' => 'object', 'properties' => array( 'name' => array( 'description' => __( 'Product name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view' ), 'readonly' => true, ), 'product_id' => array( 'description' => __( 'Product ID.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view' ), 'readonly' => true, ), 'quantity' => array( 'description' => __( 'Total number of purchases.', 'woocommerce' ), 'type' => 'integer', 'context' => array( 'view' ), 'readonly' => true, ), ), ); return $this->add_additional_fields_schema( $schema ); }