Hey
I think the only way using WIX Code would be setting up a router first where the IP is available. Read more here WixRouterRequest - Velo API Reference - Wix.com.
Or if not tied to just using built in methods why not use this resource https://ipinfo.io/json and when you hit that address using your code you will get back a json object like below and can use that data in your code. Just use fetch to call the api and I hope it does work for client request and not your servers ip.
{
“ip”: “77.91.220.221”,
“city”: “Nyköping”,
“region”: “Södermanland”,
“country”: “SE”,
“loc”: “58.7500,17.0000”,
“org”: “AS43012 Gastabudstaden AB”,
“postal”: “611 63”
}