Prevent EU Checkout for Easy Digital Downloads


This plugin requires Easy Digital Downloads.

In an attempt to comply with the 2015 changes to VAT and the EU, this plugin prevents a customer from being able to checkout if they’re from the EU. It does this by checking that the IP is not in an EU country based on data from one of two places:

  1. GeoIP, if it’s installed for PHP:
    1b. If `/wp-content/edd-pec-geoip/GeoLite2-Country.mmdb’ exists, it uses that
  2. Otherwise, it uses HostIP.Info:
  3. If returns an ZZ (aka it can’t detect the country) it blocks “Buy Now” buttons.

In addition, it adds a required checkbox that has the customer confirm they’re not from the EU.

Code is developed on Github – Issues and pull requests welcome.


  • The Setting Page


After installation, visit the EDD Extensions page and edit the values for “Prevent EU Checkout” as needed.


Installation Instructions

After installation, visit the EDD Extensions page and edit the values for “Prevent EU Checkout” as needed.

General Questions

** Why do I care if someone’s from the EU? **

On the 1st of January 2015, the VAT place of supply rules will change and make it a legal requirement that you charge VAT on a product sold to someone, based on the country where the buyer is. This means you will have to be registered for VAT in that country. There are 28 countries in the EU with 75 rates of VAT, however under a special provision for non-EU businesses, a non-EU firm need register in only one EU country.

It’s currently unknown if this applies to US based business or not. One argument is that it shouldn’t, since we’re not in the bloody EU. The other is that it does because the US agreed to a 1998 OECD agreement, we’re in trouble too.

Please read the following links and contact legal professionals with any and all questions of if you need to use this or not.

** Why does this plugin just block the EU? **

The easiest solution for most small business is to simply stop offering their products to the EU from their own stores. So here you go. If you intend to go for VAT registration, this isn’t the plugin for you.

** How do I know if I absolutely must use this? **

You hire a lawyer and let them sort it out. I’m not a lawyer. I’m not even sure if I need this.

** How does it know if someone is in the EU? **

It checks their IP address against GeoIP (if installed on your server) and then against

** What if that’s wrong? **

IPs aren’t perfect, I know. That’s why there’s a checkbox added to checkout to have the user confirm they’re not in the EU.

** What if they lie? **

Then they broke the law, not you.

** What countries are included? **

Everyone in the EU (Austria, Belgium, Bulgaria, Croatia, Republic of Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden and the UK).

** Someone from the EU just bought my products! Why isn’t this working? **

It’s possible they used a ToR proxy to hide where they were from, or ordered from a non-EU country. Basically there’s no 100% free way to check for this stuff. The checkout box at the end is a fail-safe switch in case all else fails.

** Why does my ‘Buy Now’ button say this purchase is unavailable? **

If the plugin cannot detect where you’re from, it gives you a country code of 00 and subsequently blocks buy-now. You can customize the text in the plugin settings.

** How can I use the GeoIP DB? **

Create a folder in wp-content called edd-pec-geoip

In that put the file GeoLite2-Country.mmdb (downloadable from Maxmind). The plugin will look for that file, in that location, and if it’s there it’ll run the MaxMindDB API to check your IP.

”NOTICE” That database is licensed Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0), which means you are ”required” to credit them on your site. It also means I can’t include the code here due to repository requirements. I’m not responsible for your updates.

** Is it true this plugin is also called ‘sucks to be eu’? **


Country Specific Questions

** Isn’t this illegal in the UK? **

I don’t know. Again, not a lawyer. Ask one.

** Didn’t the UK change the rules in 2016? **

The did. As Heather Burns explained, UK microtraders whose turnover is below the UK VAT registration threshold of £82,000 should use their best judgement regarding VATMOSS registration. No, we have idea what the hell that means.

** Why did South Africa get removed? **

They had a burst of common sense and said “If you make under R50,000/annum from digital sales, carry on!” Source

** What about Italy? **

Oh you read how Italy missed the deadline? Yeah, I’m leaving them on. Ciao!


WHY WHY WHY.. Quality Plugin to Stupid Rules

I was just approached by a EU customer about VATS. What the hell is VATS? Well, it is value added tax and recently, all countries have to report and file VAT for all sales made to EU customers.

Soooo. I installed this plugin to block EU customers 🙁 but trust me when I say, “You do not want to have to deal with that shnit as an American business”.

Thanks for the plugin and saving the day!

Read all 3 reviews

Contributors & Developers

“Prevent EU Checkout for Easy Digital Downloads” is open source software. The following people have contributed to this plugin.




  • Forgot to push the part where I changed sanitize_text() to santize_text_field() SIGH


  • Improved sanitization


  • Improved i18n
  • Solving Github issue #2 – Billing address is now checked for EU-ness.
  • Clean up functions
  • Documentation