woocommerce_data_source_poller_timeout
Filters the HTTP timeout (in seconds) used when fetching remote specs data sources.
Usage
add_filter( 'woocommerce_data_source_poller_timeout', 'wp_kama_woocommerce_data_source_poller_timeout_filter' );
/**
* Function for `woocommerce_data_source_poller_timeout` filter-hook.
*
* @param int $timeout Timeout in seconds.
*
* @return int
*/
function wp_kama_woocommerce_data_source_poller_timeout_filter( $timeout ){
// filter...
return $timeout;
}
- $timeout(int)
- Timeout in seconds.
Default: 3
Changelog
| Since 10.8.0 | Introduced. |
Where the hook is called
woocommerce_data_source_poller_timeout
woocommerce/src/Admin/RemoteSpecs/DataSourcePoller.php 239
'timeout' => max( 1, absint( apply_filters( 'woocommerce_data_source_poller_timeout', 3 ) ) ),