WordPress at a glance
function is not described

WC_REST_Data_Continents_Controller::get_item() public WC 3.5.0

Return the list of locations for a given continent.

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

No Hooks.

Return

WP_Error|WP_REST_Response.

Usage

$WC_REST_Data_Continents_Controller = new WC_REST_Data_Continents_Controller();
$WC_REST_Data_Continents_Controller->get_item( $request );
$request(WP_REST_Request) (required)
Request data.

Changelog

Since 3.5.0 Introduced.

Code of WC_REST_Data_Continents_Controller::get_item() WC 5.0.0

<?php
public function get_item( $request ) {
	$data = $this->get_continent( strtoupper( $request['location'] ), $request );
	if ( empty( $data ) ) {
		return new WP_Error( 'woocommerce_rest_data_invalid_location', __( 'There are no locations matching these parameters.', 'woocommerce' ), array( 'status' => 404 ) );
	}
	return $this->prepare_item_for_response( $data, $request );
}