woocommerce_logger_days_to_retain_logs filter-hookWC 3.4.0

Filter the retention period of log entries.

Usage

add_filter( 'woocommerce_logger_days_to_retain_logs', 'wp_kama_woocommerce_logger_days_to_retain_logs_filter' );

/**
 * Function for `woocommerce_logger_days_to_retain_logs` filter-hook.
 * 
 * @param int $days The number of days to retain log entries.
 *
 * @return int
 */
function wp_kama_woocommerce_logger_days_to_retain_logs_filter( $days ){

	// filter...
	return $days;
}
$days(int)
The number of days to retain log entries.

Changelog

Since 3.4.0 Introduced.

Where the hook is called

Settings::get_retention_period()
woocommerce_logger_days_to_retain_logs
woocommerce/src/Internal/Admin/Logging/Settings.php 499
$retention_period = apply_filters( 'woocommerce_logger_days_to_retain_logs', $retention_period );

Where the hook is used in WooCommerce

Usage not found.