How to Change the Timeout for ActiveCampaign

Overview

Do you need to change the timeout on your server when processing WPForms entries to ActiveCampaign? 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. In this tutorial, we’ll walk you through how to achieve this.

Setup

Simply copy and paste this snippet to your site. If you need help in adding snippets to your site, please review this tutorial.

/**
 * Change the timeout seconds when processing WPForms entries to ActiveCampaign
 *
 * @link    https://wpforms.com/developers/wpforms_upload_root/
 */
 
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 );

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.