PHPackages                             sehrgut/wp-eu-vat-helpers - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sehrgut/wp-eu-vat-helpers

AbandonedArchivedWordpress-plugin[Utility &amp; Helpers](/categories/utility)

sehrgut/wp-eu-vat-helpers
=========================

WordPress helper shortcodes to display prices including applicable VAT rate for the user's location (based on IP address)

1.1.2(8y ago)015MITPHP

Since Aug 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sehrgutesoftware/wp-eu-vat-helpers)[ Packagist](https://packagist.org/packages/sehrgut/wp-eu-vat-helpers)[ RSS](/packages/sehrgut-wp-eu-vat-helpers/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (5)Used By (0)

WordPress EU VAT Helpers
========================

[](#wordpress-eu-vat-helpers)

[![WordPress](https://camo.githubusercontent.com/9b8354d815282c6c1c66729538ab495c546c113c273a2008cb4506a62e55aa7c/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f762f77702d65752d7661742d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://wordpress.org/plugins/wp-eu-vat-helpers) [![Packagist](https://camo.githubusercontent.com/94cb16206747e0d6c654a1082451951bfa33b18cc7fafa3334096a0d8510869b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736568726775742f77702d65752d7661742d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/sehrgut/wp-eu-vat-helpers) [![Travis Build Status](https://camo.githubusercontent.com/7185fcc0bd825ceff8a02ad5ea67cdcf7a6413b2d1680728a8dbc06d74a7886d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7365687267757465736f6674776172652f77702d65752d7661742d68656c706572732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/sehrgutesoftware/wp-eu-vat-helpers) [![Codecov](https://camo.githubusercontent.com/62846c84379bc59ac618e59cdeb0dc9f117ffd599f8543da3923e14e3c573765/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7365687267757465736f6674776172652f77702d65752d7661742d68656c706572732e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/sehrgutesoftware/wp-eu-vat-helpers) [![StyleCI Status](https://camo.githubusercontent.com/30cb8ea02c453d5b4750f66e2ee16ebe22e1bccf54829f62d1e9c582cd9e557d/68747470733a2f2f7374796c6563692e696f2f7265706f732f36363535353738392f736869656c64)](https://styleci.io/repos/66555789)

> WordPress helper shortcodes to display prices including applicable VAT rate for the user's location (based on IP address)

This WordPress plugin is basically a wrapper around the nifty [mpociot/vat-calculator](https://github.com/mpociot/vat-calculator) library. Use at your own risk for the following:

- Format number as localized currency, adding VAT according to the rate of the visitor's country
- Display tax rate of the visitor's coutry
- Display the visitor's country
- Conditionally show/hide elements based on whether EU VAT is applicable in the visitor's country

Installation
------------

[](#installation)

1. Recommended (most frequent updates): `composer require sehrgut/wp-eu-vat-helpers`
2. Alternative (possibly outdated): Via [WordPress plugin directory](https://wordpress.org/plugins/wp-eu-vat-helpers/) or zip download, you know that stuff for sure…

Available Shortcodes
--------------------

[](#available-shortcodes)

- [`[localize_currency]`](#localize_currency)
- [`[vat_rate]`](#vat_rate)
- [`[ip_country]`](#ip_country)
- [`[if_taxable] … [/if_taxable]`](#if_taxable)
- [`[unless_taxable] … [/unless_taxable]`](#unless_taxable)

### Shortcode Usage

[](#shortcode-usage)

---

#### \[localize\_currency\]

[](#localize_currency)

> Add EU VAT to value and format the result as currency.

**Example:**

```
[localize_currency value="133.42" currency="EUR"]

```

**Attributes:**

Attribute Required Default Effect`value`required–The amount to format`currency`optional'EUR'Currency as three-letter [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) code`country`optional based on user's IP address Override the country for which to apply taxes and adapt the format (two-letter [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code)---

#### \[vat\_rate\]

[](#vat_rate)

> Display the EU VAT rate applicabe in the current user's country in percent.

**Example:**

```
[vat_rate]

```

**Attributes:**

Attribute Required Default Effect`country`optional based on user's IP address Override the country whose VAT rate to display (two-letter [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code)---

#### \[ip\_country\]

[](#ip_country)

> Display the current user's country based on their IP address.

**Example:**

```
[ip_country]

```

**Attributes:** none

---

#### \[if\_taxable\]

[](#if_taxable)

> Condtitionally display a piece of content if EU VAT is applicable in the current user's country.

**Example:**

```
[if_taxable]Echo something[/if_taxable]

```

**Attributes:**

Attribute Required Default Effect`country`optional based on user's IP address Override the country for which to check (two-letter [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code)---

#### \[unless\_taxable\]

[](#unless_taxable)

> Condtitionally display a piece of content if EU VAT is *not* applicable in the current user's country. (Inverse of `if_taxable`)

**Example:**

```
[unless_taxable]Echo something[/unless_taxable]

```

**Attributes:**

Attribute Required Default Effect`country`optional based on user's IP address Override the country for which to check (two-letter [ISO-3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code)Devlopment / Testing
--------------------

[](#devlopment--testing)

```
# Install
git clone git@github.com/sehrgutesoftware/wp-eu-vat-helpers.git
cd wp-eu-vat-helpers
composer install

# Test
composer unit
composer integration
```

Support
-------

[](#support)

Please use [Github Issues](https://github.com/sehrgutesoftware/wp-eu-vat-helpers/issues) for Questions, Bug reports, Feature suggestions and everything else.

Compatibility
-------------

[](#compatibility)

This plugin was tested with WordPress 4.8.x and PHP 7.1 &amp; 7.2

License
-------

[](#license)

Copyright 2017 Sehr gute GmbH – licensed under the [MIT License](LICENSE.md).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~25 days

Total

4

Last Release

3103d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5419165?v=4)[Joseph Paul](/maintainers/jsphpl)[@jsphpl](https://github.com/jsphpl)

---

Top Contributors

[![jsphpl](https://avatars.githubusercontent.com/u/5419165?v=4)](https://github.com/jsphpl "jsphpl (41 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sehrgut-wp-eu-vat-helpers/health.svg)

```
[![Health](https://phpackages.com/badges/sehrgut-wp-eu-vat-helpers/health.svg)](https://phpackages.com/packages/sehrgut-wp-eu-vat-helpers)
```

###  Alternatives

[phannaly/php-datetime-khmer

The PHP library for convert datetime to Khmer

1510.3k](/packages/phannaly-php-datetime-khmer)[moosend/website-tracking

By installing the Moosend PHP Tracking library you are can track page views, product views, add to cart events and successful purchases. You can later use these details to segment your user base, run automations, check how successful your latest promo has been and how many conversions your landing page has led to.

1020.9k1](/packages/moosend-website-tracking)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
