# Store Shortened IP Addresses for Easy Digital Downloads Orders

> Shortens the customer IP address that Easy Digital Downloads records with orders and customer logs, so a full address is never stored.

- Type: PHP
- Runs: Run everywhere
- Category: [Privacy & Cookies](https://wpide.com/library/category/privacy/)
- Requires: Easy Digital Downloads
- Tags: edd, ip-address, gdpr
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/privacy-edd-mask-ip/

## Code

```php
add_filter( 'edd_get_ip', function ( $ip ) {
    return $ip && function_exists( 'wp_privacy_anonymize_ip' ) ? wp_privacy_anonymize_ip( $ip ) : $ip;
}, 20 );
```

## Notes

EDD's fraud and file download limits that rely on IP addresses then work per network instead of per device.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Store Shortened IP Addresses for Easy Digital Downloads Orders" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
