Created
November 10, 2015 10:24
-
-
Save walterebert/6dba5706056b2c1dc3df to your computer and use it in GitHub Desktop.
WordPress snippet: Increase timeout for HTTP requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_http_api_curl( $handle ) { | |
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 180 ); | |
curl_setopt( $handle, CURLOPT_TIMEOUT, 180 ); | |
} | |
add_action( 'http_api_curl', 'my_http_api_curl', 100, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment