Automattic\WooCommerce\Internal\RestApi\Routes\V4\Customers

Controller::get_item_response │ protected │ WC 1.0

Prepare a single customer object for response.

Метод класса: Controller{}

Хуков нет.

Возвращает

array.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_item_response( $customer, $request ): array;
$customer(WC_Customer) (обязательный)
Customer object.
$request(WP_REST_Request) (обязательный)
Request object.

Код Controller::get_item_response() WC 11.2.2

protected function get_item_response( $customer, WP_REST_Request $request ): array {
	return $this->item_schema->get_item_response( $customer, $request, $this->get_fields_for_response( $request ) );
}