WC_REST_Shipping_Zone_Methods_Controller::get_item_schema()publicWC 1.0

Get the settings schema, conforming to JSON Schema.

Метод класса: WC_REST_Shipping_Zone_Methods_Controller{}

Хуков нет.

Возвращает

Массив.

Использование

$WC_REST_Shipping_Zone_Methods_Controller = new WC_REST_Shipping_Zone_Methods_Controller();
$WC_REST_Shipping_Zone_Methods_Controller->get_item_schema();

Код WC_REST_Shipping_Zone_Methods_Controller::get_item_schema() WC 8.7.0

public function get_item_schema() {
	// Get parent schema to append additional supported settings types for shipping zone method.
	$schema = parent::get_item_schema();

	// Append additional settings supported types (class, order).
	$schema['properties']['settings']['properties']['type']['enum'][] = 'class';
	$schema['properties']['settings']['properties']['type']['enum'][] = 'order';

	return $this->add_additional_fields_schema( $schema );
}