WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_REST_Shipping_Methods_V2_Controller::get_items() public WC 1.0

Get shipping methods.

{} Это метод класса: WC_REST_Shipping_Methods_V2_Controller{}

Хуков нет.

Возвращает

WP_Error/WP_REST_Response.

Использование

$WC_REST_Shipping_Methods_V2_Controller = new WC_REST_Shipping_Methods_V2_Controller();
$WC_REST_Shipping_Methods_V2_Controller->get_items( $request );
$request(WP_REST_Request) (обязательный)
Full details about the request.

Код WC_REST_Shipping_Methods_V2_Controller::get_items() WC 4.7.0

<?php
public function get_items( $request ) {
	$wc_shipping = WC_Shipping::instance();
	$response    = array();
	foreach ( $wc_shipping->get_shipping_methods() as $id => $shipping_method ) {
		$method     = $this->prepare_item_for_response( $shipping_method, $request );
		$method     = $this->prepare_response_for_collection( $method );
		$response[] = $method;
	}
	return rest_ensure_response( $response );
}