wc_cleanup_logs()
Trigger logging cleanup using the logging class.
Хуков нет.
Возвращает
null. Ничего (null).
Использование
wc_cleanup_logs();
Список изменений
| С версии 3.4.0 | Введена. |
Код wc_cleanup_logs() wc cleanup logs WC 10.9.1
function wc_cleanup_logs() {
$logger = wc_get_logger();
if ( is_callable( array( $logger, 'clear_expired_logs' ) ) ) {
$logger->clear_expired_logs();
}
wc_get_container()->get( OrderLogsCleanupHelper::class )->cleanup();
}