diff --git a/includes/class-wc-geolocation.php b/includes/class-wc-geolocation.php index 258243a07b9..e12671971c8 100644 --- a/includes/class-wc-geolocation.php +++ b/includes/class-wc-geolocation.php @@ -76,7 +76,7 @@ class WC_Geolocation { $response = wp_remote_get( $service_endpoint, array( 'timeout' => 2 ) ); if ( ! is_wp_error( $response ) && $response['body'] ) { - $external_ip_address = apply_filters( 'woocommerce_geolocation_ip_lookup_api_response', $response['body'], $service_name ); + $external_ip_address = apply_filters( 'woocommerce_geolocation_ip_lookup_api_response', wc_clean( $response['body'] ), $service_name ); break; } }