gotreu_standard_vat_rate

Updated 15 September 2026

On this page

Description

Changes the VAT rate of one country, right before the plugin uses it. It runs for EU countries only, after the “Disable variable VAT” setting, and changes the rate shown in the form, the VAT that is saved and the rate in the VIES details of the entry.

It doesn’t change the rate that is used when no country is selected yet; that is the rate of your default tax country, see gotreu_default_tax_country_info.

A form specific variant exists as well: add _FORMID to the hook name, for example gotreu_standard_vat_rate_3 for form 3. The form ID is only part of the hook name, it is not passed to your function.

Parameters

$rate | Int or float. The standard rate of the country

$country_code | String. The country code, for example DE. Greece is EL

Return

Int or float

Usage

Copy the below code to the functions.php of your child theme or to your snippet plugin.

<?php
add_filter( 'gotreu_standard_vat_rate', function( $rate, $country_code ) {
    // Customers in Ireland pay 13.5%.
    if ( 'IE' === $country_code ) {
        return 13.5;
    }
    return $rate;
}, 10, 2 );

Since

version 1.0.1

Didn’t find what you were looking for?

Or contact support and I will help you out.

Scroll to Top