WC_REST_Shipping_Zone_Locations_V2_Controller::register_routes()
Register the routes for Shipping Zone Locations.
Method of the class: WC_REST_Shipping_Zone_Locations_V2_Controller{}
No Hooks.
Return
null
. Nothing.
Usage
$WC_REST_Shipping_Zone_Locations_V2_Controller = new WC_REST_Shipping_Zone_Locations_V2_Controller(); $WC_REST_Shipping_Zone_Locations_V2_Controller->register_routes();
WC_REST_Shipping_Zone_Locations_V2_Controller::register_routes() WC REST Shipping Zone Locations V2 Controller::register routes code WC 7.7.0
public function register_routes() { register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\d]+)/locations', array( 'args' => array( 'id' => array( 'description' => __( 'Unique ID for the resource.', 'woocommerce' ), 'type' => 'integer', ), ), array( 'methods' => WP_REST_Server::READABLE, 'callback' => array( $this, 'get_items' ), 'permission_callback' => array( $this, 'get_items_permissions_check' ), ), array( 'methods' => WP_REST_Server::EDITABLE, 'callback' => array( $this, 'update_items' ), 'permission_callback' => array( $this, 'update_items_permissions_check' ), 'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ), ), 'schema' => array( $this, 'get_public_item_schema' ), ) ); }