WordPress at Your Fingertips
filter is not described

woocommerce_rest_prepare_payment_gateway filter-hook . WC 1.0

Filter payment gateway objects returned from the REST API.

Usage

add_filter( 'woocommerce_rest_prepare_payment_gateway', 'filter_function_name_5987', 10, 3 );
function filter_function_name_5987( $response, $gateway, $request ){
	// filter...

	return $response;
}
$response(WP_REST_Response)
The response object.
$gateway(WC_Payment_Gateway)
Payment gateway object.
$request(WP_REST_Request)
Request object.

Where the hook is called

WC_REST_Payment_Gateways_Controller::prepare_item_for_response()
woocommerce_rest_prepare_payment_gateway
WC_REST_Payment_Gateways_V2_Controller::prepare_item_for_response()
woocommerce_rest_prepare_payment_gateway
woocommerce/includes/rest-api/Controllers/Version3/class-wc-rest-payment-gateways-controller.php 63
return apply_filters( 'woocommerce_rest_prepare_payment_gateway', $response, $gateway, $request );
woocommerce/includes/rest-api/Controllers/Version2/class-wc-rest-payment-gateways-v2-controller.php 278
return apply_filters( 'woocommerce_rest_prepare_payment_gateway', $response, $gateway, $request );

Where in WP core the hook is used WooCommerce

woocommerce/packages/woocommerce-admin/src/Features/PaymentGatewaySuggestions/PaymentGatewaysController.php 21
add_filter( 'woocommerce_rest_prepare_payment_gateway', array( __CLASS__, 'extend_response' ), 10, 3 );