WordPress at Your Fingertips
function is not described

WC_REST_Payment_Gateways_V2_Controller::get_item() public WC 1.0

Get a single payment gateway.

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

No Hooks.

Return

WP_REST_Response|WP_Error.

Usage

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

Code of WC_REST_Payment_Gateways_V2_Controller::get_item() WC 5.9.0

public function get_item( $request ) {
	$gateway = $this->get_gateway( $request );

	if ( is_null( $gateway ) ) {
		return new WP_Error( 'woocommerce_rest_payment_gateway_invalid', __( 'Resource does not exist.', 'woocommerce' ), array( 'status' => 404 ) );
	}

	$gateway = $this->prepare_item_for_response( $gateway, $request );
	return rest_ensure_response( $gateway );
}