woocommerce_logger_days_to_retain_logs filter-hookWC 3.4.0

Clear all logs older than a defined number of days. Defaults to 30 days.

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  $30 
 *
 * @return 
 */
function wp_kama_woocommerce_logger_days_to_retain_logs_filter( $30 ){

	// filter...
	return $30;
}
$30
-

Changelog

Since 3.4.0 Introduced.

Where the hook is called

WC_Logger::clear_expired_logs()
woocommerce_logger_days_to_retain_logs
woocommerce/includes/class-wc-logger.php 306
$days      = absint( apply_filters( 'woocommerce_logger_days_to_retain_logs', 30 ) );

Where the hook is used in WooCommerce

Usage not found.