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.

Метод класса: FileController{}

Хуки из метода

Возвращает

int.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->get_file_size_limit(): int;

Код FileController::get_file_size_limit() WC 9.7.1

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;
}