WordPress at Your Fingertips
function is not described

WC_REST_Shipping_Zone_Locations_V2_Controller::get_item_schema() public WC 1.0

Get the Shipping Zone Locations schema, conforming to JSON Schema

{} It's a method of the class: WC_REST_Shipping_Zone_Locations_V2_Controller{}

No Hooks.

Return

Array.

Usage

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

Code of WC_REST_Shipping_Zone_Locations_V2_Controller::get_item_schema() WC 5.9.0

public function get_item_schema() {
	$schema = array(
		'$schema'    => 'http://json-schema.org/draft-04/schema#',
		'title'      => 'shipping_zone_location',
		'type'       => 'object',
		'properties' => array(
			'code' => array(
				'description' => __( 'Shipping zone location code.', 'woocommerce' ),
				'type'        => 'string',
				'context'     => array( 'view', 'edit' ),
			),
			'type' => array(
				'description' => __( 'Shipping zone location type.', 'woocommerce' ),
				'type'        => 'string',
				'default'     => 'country',
				'enum'        => array(
					'postcode',
					'state',
					'country',
					'continent',
				),
				'context'     => array( 'view', 'edit' ),
			),
		),
	);

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