How to Change the Timeout for ActiveCampaign

Overview

Do you need to change the timeout for ActiveCampaign when processing WPForms entries? When processing WPForms entries to ActiveCampaign will need to use your server resources to do so. If the entries are not appearing, it could be that the server is timing out in the process. If you would like to change the timeout time that your server uses, you’ll need to use a PHP snippet and we’re going to show you how!

Setup

Once you’ve created your form and connected your form to ActiveCampaign, simply copy and paste this snippet to your site.

For assistance in connecting your ActiveCampaign to WPForms, please check out this documentation.

If you need help in adding snippets to your site, please review this tutorial.

/**
 * Change the timeout for ActiveCampaign when processing WPForms entries 
 *
 * @link    https://wpforms.com/developers/how-to-change-the-timeout-for-activecampaign/
 */
 
function wpf_dev_ac_timeout( $args, $instance ) {
  
    // Set the timeout in seconds
    $args[ 'timeout' ] = 60;
	
	return $args;
        
}
add_filter( 'wpformsactivecampaign_api_v3_http_request_get_default_parameters', 'wpf_dev_ac_timeout', 10, 2 );

With the above snippet, we’ve changed the default timeout to 60 seconds.

And that’s all you need to change the timeout argument with ActiveCampaign. Would you like to also change the timeout with the Modern File Upload form field? Check out our article How to Change the Timeout on the Modern File Upload.