Merge pull request #7335 from om4james/geolocation-external-ip-fix

Geolocation: strip whitespace when obtaining external IP
This commit is contained in:
Mike Jolley 2015-02-09 23:58:59 +00:00
commit 1ec64a264d
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}
}