WordPress at Your Fingertips
function is not described

WC_REST_Payment_Gateways_V2_Controller::get_items() public WC 1.0

Get payment gateways.

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

No Hooks.

Return

WP_Error|WP_REST_Response.

Usage

$WC_REST_Payment_Gateways_V2_Controller = new WC_REST_Payment_Gateways_V2_Controller();
$WC_REST_Payment_Gateways_V2_Controller->get_items( $request );
$request(WP_REST_Request) (required)
Full details about the request.

Code of WC_REST_Payment_Gateways_V2_Controller::get_items() WC 5.9.0

public function get_items( $request ) {
	$payment_gateways = WC()->payment_gateways->payment_gateways();
	$response         = array();
	foreach ( $payment_gateways as $payment_gateway_id => $payment_gateway ) {
		$payment_gateway->id = $payment_gateway_id;
		$gateway             = $this->prepare_item_for_response( $payment_gateway, $request );
		$gateway             = $this->prepare_response_for_collection( $gateway );
		$response[]          = $gateway;
	}
	return rest_ensure_response( $response );
}