WC_REST_Shipping_Zone_Methods_Controller{} WC 1.0
REST API Shipping Zone Methods class.
Хуков нет.
Возвращает
null
. Ничего.
Использование
$WC_REST_Shipping_Zone_Methods_Controller = new WC_REST_Shipping_Zone_Methods_Controller(); // use class methods
Методы
Заметки
- Пакет: WooCommerce\RestApi
Код WC_REST_Shipping_Zone_Methods_Controller{} WC REST Shipping Zone Methods Controller{} WC 5.2.2
class WC_REST_Shipping_Zone_Methods_Controller extends WC_REST_Shipping_Zone_Methods_V2_Controller {
/**
* Endpoint namespace.
*
* @var string
*/
protected $namespace = 'wc/v3';
/**
* Get the settings schema, conforming to JSON Schema.
*
* @return array
*/
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 );
}
}