WC_Admin_Status::status_logs_file()public staticWC 1.0

Show the log page contents for file log handler.

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

No Hooks.

Return

null. Nothing.

Usage

$result = WC_Admin_Status::status_logs_file();

Code of WC_Admin_Status::status_logs_file() WC 6.7.0

public static function status_logs_file() {
	$logs = self::scan_log_files();

	if ( ! empty( $_REQUEST['log_file'] ) && isset( $logs[ sanitize_title( wp_unslash( $_REQUEST['log_file'] ) ) ] ) ) { // WPCS: input var ok, CSRF ok.
		$viewed_log = $logs[ sanitize_title( wp_unslash( $_REQUEST['log_file'] ) ) ]; // WPCS: input var ok, CSRF ok.
	} elseif ( ! empty( $logs ) ) {
		$viewed_log = current( $logs );
	}

	$handle = ! empty( $viewed_log ) ? self::get_log_file_handle( $viewed_log ) : '';

	if ( ! empty( $_REQUEST['handle'] ) ) { // WPCS: input var ok, CSRF ok.
		self::remove_log();
	}

	include_once __DIR__ . '/views/html-admin-page-status-logs.php';
}