woocommerce_data_source_poller_timeout │ хук-фильтр │ WC 10.8.0

Filters the HTTP timeout (in seconds) used when fetching remote specs data sources.

Использование

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.
По умолчанию: 3

Список изменений

С версии 10.8.0 Введена.

Где вызывается хук

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 ) ) ),

Где используется хук в WooCommerce

Использование не найдено.