WC_REST_Tax_Classes_V1_Controller::get_item_schema()
Get the Tax Classes schema, conforming to JSON Schema
Method of the class: WC_REST_Tax_Classes_V1_Controller{}
No Hooks.
Return
Array
.
Usage
$WC_REST_Tax_Classes_V1_Controller = new WC_REST_Tax_Classes_V1_Controller(); $WC_REST_Tax_Classes_V1_Controller->get_item_schema();
WC_REST_Tax_Classes_V1_Controller::get_item_schema() WC REST Tax Classes V1 Controller::get item schema code WC 9.8.1
public function get_item_schema() { $schema = array( '$schema' => 'http://json-schema.org/draft-04/schema#', 'title' => 'tax_class', 'type' => 'object', 'properties' => array( 'slug' => array( 'description' => __( 'Unique identifier for the resource.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'readonly' => true, ), 'name' => array( 'description' => __( 'Tax class name.', 'woocommerce' ), 'type' => 'string', 'context' => array( 'view', 'edit' ), 'required' => true, 'arg_options' => array( 'sanitize_callback' => 'sanitize_text_field', ), ), ), ); return $this->add_additional_fields_schema( $schema ); }