wc_cleanup_logs()WC 3.4.0

Trigger logging cleanup using the logging class.

No Hooks.

Return

null. Nothing (null).

Usage

wc_cleanup_logs();

Changelog

Since 3.4.0 Introduced.

wc_cleanup_logs() code WC 8.7.0

function wc_cleanup_logs() {
	$logger = wc_get_logger();

	if ( is_callable( array( $logger, 'clear_expired_logs' ) ) ) {
		$logger->clear_expired_logs();
	}
}