WC_REST_Shipping_Zone_Methods_Controller::get_item_schema
Get the settings schema, conforming to JSON Schema.
Method of the class: WC_REST_Shipping_Zone_Methods_Controller{}
No Hooks.
Returns
Array.
Usage
$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 REST Shipping Zone Methods Controller::get item schema code WC 10.8.1
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 );
}