WordPress at Your Fingertips
function is not described

WC_Log_Handler_File::get_log_files() public WC 3.4.0

Get all log files in the log directory.

{} It's a method of the class: WC_Log_Handler_File{}

No Hooks.

Return

Array.

Usage

$result = WC_Log_Handler_File::get_log_files();

Changelog

Since 3.4.0 Introduced.

Code of WC_Log_Handler_File::get_log_files() WC 5.8.0

public static function get_log_files() {
	$files  = @scandir( WC_LOG_DIR ); // @codingStandardsIgnoreLine.
	$result = array();

	if ( ! empty( $files ) ) {
		foreach ( $files as $key => $value ) {
			if ( ! in_array( $value, array( '.', '..' ), true ) ) {
				if ( ! is_dir( $value ) && strstr( $value, '.log' ) ) {
					$result[ sanitize_title( $value ) ] = $value;
				}
			}
		}
	}

	return $result;
}