gotreu_vies_transient_expiration

Updated 15 September 2026

On this page

Description

Changes how long a validated VAT number stays valid. When your customer presses Validate, the answer of VIES is kept for one hour. When they submit the form later than that, they are asked to validate again (“Your VAT number validation has expired. Please validate it again.”). Make it longer for long or multi page forms, or when you use Save and Continue.

This filter is not form specific. Use the $form_id parameter to limit it to one form.

Parameters

$expiration | Int. The number of seconds, 3600 (one hour) by default

$identifier | String. The internal key of this validation

$form_id | String. The ID of the form

Return

Int. The number of seconds

Usage

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

<?php
add_filter( 'gotreu_vies_transient_expiration', function( $expiration, $identifier, $form_id ) {
    return 3 * HOUR_IN_SECONDS; // Three hours.
}, 10, 3 );

Since

version 1.1.0

Didn’t find what you were looking for?

Or contact support and I will help you out.

Scroll to Top