WC_REST_Shipping_Zone_Locations_V2_Controller::prepare_links()
Prepare links for the request.
Method of the class: WC_REST_Shipping_Zone_Locations_V2_Controller{}
No Hooks.
Return
Array
. Links for the given Shipping Zone Location.
Usage
// protected - for code of main (parent) or child class $result = $this->prepare_links( $zone_id );
- $zone_id(int) (required)
- Given Shipping Zone ID.
WC_REST_Shipping_Zone_Locations_V2_Controller::prepare_links() WC REST Shipping Zone Locations V2 Controller::prepare links code WC 7.7.0
protected function prepare_links( $zone_id ) { $base = '/' . $this->namespace . '/' . $this->rest_base . '/' . $zone_id; $links = array( 'collection' => array( 'href' => rest_url( $base . '/locations' ), ), 'describes' => array( 'href' => rest_url( $base ), ), ); return $links; }