WC_REST_Taxes_Controller::get_item_schema()
Get the taxes schema, conforming to JSON Schema.
Method of the class: WC_REST_Taxes_Controller{}
No Hooks.
Return
Array
.
Usage
$WC_REST_Taxes_Controller = new WC_REST_Taxes_Controller(); $WC_REST_Taxes_Controller->get_item_schema();
WC_REST_Taxes_Controller::get_item_schema() WC REST Taxes Controller::get item schema code WC 9.5.1
public function get_item_schema() { $schema = parent::get_item_schema(); $schema['properties']['postcodes'] = array( 'description' => __( 'List of postcodes / ZIPs. Introduced in WooCommerce 5.3.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'string', ), 'context' => array( 'view', 'edit' ), ); $schema['properties']['cities'] = array( 'description' => __( 'List of city names. Introduced in WooCommerce 5.3.', 'woocommerce' ), 'type' => 'array', 'items' => array( 'type' => 'string', ), 'context' => array( 'view', 'edit' ), ); $schema['properties']['postcode']['description'] = __( "Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead.", 'woocommerce' ); $schema['properties']['city']['description'] = __( "City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead.", 'woocommerce' ); return $schema; }