diff --git a/classes/UpgradeContainer.php b/classes/UpgradeContainer.php index f03527ecb..e6c2ceb1e 100644 --- a/classes/UpgradeContainer.php +++ b/classes/UpgradeContainer.php @@ -282,7 +282,7 @@ public function getProperty(string $property): ?string case self::ARCHIVE_FILEPATH: return $this->getProperty(self::DOWNLOAD_PATH) . DIRECTORY_SEPARATOR . $this->getProperty(self::ARCHIVE_FILENAME); case self::PS_VERSION: - return $this->getPrestaShopConfiguration()->getPrestaShopVersion(); + return $this->getCurrentPrestaShopVersion(); default: return ''; } @@ -361,6 +361,15 @@ public function getChecksumCompare(): ChecksumCompare return $this->checksumCompare; } + public function getCurrentPrestaShopVersion(): string + { + if ($this->getUpdateState()->isInitialized()) { + return $this->getUpdateState()->getCurrentVersion(); + } + + return $this->getPrestaShopConfiguration()->getPrestaShopVersion(); + } + public function getComposerService(): ComposerService { if (null === $this->composerService) {