WC_REST_Taxes_Controller::get_item_schema()
Get the taxes schema, conforming to JSON Schema.
Метод класса: WC_REST_Taxes_Controller{}
Хуков нет.
Возвращает
Массив
.
Использование
$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 WC 9.3.3
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; }