ご注意!

この記事には PHP コードが含まれており、開発者を対象としています。このコードは便宜上提供していますが、コードのカスタマイズやサードパーティの開発についてはサポートを提供していません。

追加のガイダンスについては、WPBeginner の カスタムコードの追加方法に関するチュートリアル を参照してください。

閉じる

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!

セットアップ

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.