woocommerce_data_source_poller_timeout filter-hookWC 10.8.0

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

DataSourcePoller::read_data_source()
woocommerce_data_source_poller_timeout
woocommerce/src/Admin/RemoteSpecs/DataSourcePoller.php 239
'timeout'    => max( 1, absint( apply_filters( 'woocommerce_data_source_poller_timeout', 3 ) ) ),

Where the hook is used in WooCommerce

Usage not found.