Automattic\WooCommerce\Internal\Admin\Logging\FileV2

FileController::get_file_size_limit()privateWC 1.0

Get the file size limit that determines when to rotate a file.

Method of the class: FileController{}

Hooks from the method

Return

Int.

Usage

// private - for code of main (parent) class only
$result = $this->get_file_size_limit(): int;

FileController::get_file_size_limit() code WC 9.3.3

private function get_file_size_limit(): int {
	$default = 5 * MB_IN_BYTES;

	/**
	 * Filter the threshold size of a log file at which point it will get rotated.
	 *
	 * @since 3.4.0
	 *
	 * @param int $file_size_limit The file size limit in bytes.
	 */
	$file_size_limit = apply_filters( 'woocommerce_log_file_size_limit', $default );

	if ( ! is_int( $file_size_limit ) || $file_size_limit < 1 ) {
		return $default;
	}

	return $file_size_limit;
}