woocommerce_update_user_last_active_threshold │ хук-фильтр │ WC 10.7.0

Enables customization of the update frequency for user last active meta by adjusting the threshold from default to custom values. Note that a lower threshold results in more frequent database writes by Woo core and, if enabled, Analytics.

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

add_filter( 'woocommerce_update_user_last_active_threshold', 'wp_kama_woocommerce_update_user_last_active_threshold_filter' );

/**
 * Function for `woocommerce_update_user_last_active_threshold` filter-hook.
 * 
 * @param int $threshold The threshold in seconds to be applied (1 minute, 5 minutes and 0 for
 *                       immediate update).
 *
 * @return int
 */
function wp_kama_woocommerce_update_user_last_active_threshold_filter( $threshold ){
	// filter...
	return $threshold;
}
$threshold(int)
The threshold in seconds to be applied (1 minute, 5 minutes and 0 for immediate update).

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

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

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

wc_update_user_last_active()
woocommerce_update_user_last_active_threshold
woocommerce/includes/wc-user-functions.php 1141
$threshold = (int) apply_filters( 'woocommerce_update_user_last_active_threshold', $threshold );

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

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