Using Gravity Forms ‘gform_user_registration_pending_activation_expiration’ PHP filter

The gform_user_registration_pending_activation_expiration filter allows you to override the expiration period for pending activations in Gravity Forms.

Usage

add_filter('gform_user_registration_pending_activation_expiration', 'your_function_name');

Parameters

  • $expiration_time (int): Expiration time in seconds. Defaults to 172800 (2 days).

More information

See Gravity Forms Docs: gform_user_registration_pending_activation_expiration

Examples

Set expiration time to 30 seconds

This example sets the pending activation expiration time to 30 seconds.

add_filter('gform_user_registration_pending_activation_expiration', function($expiration) {
    // Expiration time (Seconds)
    return 30;
});

Set expiration time to 1 hour

This example sets the pending activation expiration time to 1 hour.

add_filter('gform_user_registration_pending_activation_expiration', function($expiration) {
    // Expiration time (Seconds)
    return 3600;
});

Set expiration time to 1 day

This example sets the pending activation expiration time to 1 day.

add_filter('gform_user_registration_pending_activation_expiration', function($expiration) {
    // Expiration time (Seconds)
    return 86400;
});

Set expiration time to 1 week

This example sets the pending activation expiration time to 1 week.

add_filter('gform_user_registration_pending_activation_expiration', function($expiration) {
    // Expiration time (Seconds)
    return 604800;
});

Set expiration time to 30 days

This example sets the pending activation expiration time to 30 days.

add_filter('gform_user_registration_pending_activation_expiration', function($expiration) {
    // Expiration time (Seconds)
    return 2592000;
});