WC_REST_Shipping_Zone_Methods_Controller{}
REST API Shipping Zone Methods class.
No Hooks.
Usage
$WC_REST_Shipping_Zone_Methods_Controller = new WC_REST_Shipping_Zone_Methods_Controller(); // use class methods
Methods
- public get_item_schema()
Notes
- Package: WooCommerce\RestApi
WC_REST_Shipping_Zone_Methods_Controller{} WC REST Shipping Zone Methods Controller{} code WC 9.3.1
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 ); } }