How it Works

This plugin adds a new section on the Membership Checkout form titled “European Union Residents VAT”. The customer can select their EU country of residence from a drop-down box or enter their VAT number to avoid the tax. The entered VAT number is validated using the SOAP service provided through the European Commission [docs].

VAT rates are automatically calculated based on the constant rates defined in the plugin. The rates in our plugin are those currently listed by the European Commission [docs].

EU tax rates are being reduced on July 1, 2020. The adjustment depends on which country you are located in and the industry your business operates under. Read the blog post here which includes more information about the update and code recipes to adjust your site’s tax calculations.

Installation

You must have the Paid Memberships Pro plugin installed and activated with a valid license type to use this Add On.

  1. Navigate to Memberships > Add Ons in the WordPress admin.
  2. Locate the Add On and click Install Now.
    • To install this plugin manually, download the .zip file above, then upload the compressed directory via the Plugins > Add New > Upload Plugin screen in the WordPress admin.
  3. Activate the plugin through the Plugins screen in the WordPress admin.

Add your “Seller Country” to the Payment Gateway page in the Memberships > Settings > Payment Gateway & SSL.

Automatically Detect the User’s Location

We’ve recently added GeoIP support to this add on to automatically detect the user’s country. You must install and activate the GeoIP Detect plugin in order to take advantage of this integration.

Action and Filter Hooks

apply_filters('pmpro_vat_by_country', $pmpro_vat_by_country)
  • Filters the VAT tax rate for each countries
  • $pmpro_vat_by_country – array mapping country abbreviations to their respective tax rates
apply_filters('pmpro_european_union', $pmpro_european_union)
  • Filters the list of countries in the European Union
  • $pmpro_european_union – array mapping country abbreviations to their full country names
apply_filters( 'pmprovat_hide_vat_if_same_country', true )
  • Filters whether the VAT field should be hidden if the buyer’s country matches the sellers
apply_filters('pmprovat_skip_validation', false)
  • Filters whether PMPro should skip validating VAT numbers that are entered
apply_filters('pmprovat_custom_vat_number_validate', $result)
  • Filters the result of a VAT number validation check
apply_filters( 'pmprovat_calculated_taxes', $tax, $values, $vat_rate, $vat_number, $eucountry, $bstate )
  • Filters the amount of VAT tax that is added to an order
  • $tax – a float that is being added to the order
  • $values – array passed to the pmpro_tax() function
  • $vat_rate – float being charged
  • string $vat_number that the user entered
  • string $eu_country that the buyer is from
  • string $bstate that the buyer is from
apply_filters( 'pmprovat_rounding', 2 )
  • Filters the number of decimals to round VAT tax amounts to
  • Parameter – integer, default 2

Screenshots

Additional Box on Membership Checkout to Select Country of Residence or Enter VAT Number
Additional Box on Membership Checkout to Select Country of Residence or Enter VAT Number
Selected "Enter VAT Number" at Membership Checkout
Selected “Enter VAT Number” at Membership Checkout

This is a Standard Add On.

Standard Add Ons are included in all premium membership plans.