Skip to content

Commit 4ddba3b

Browse files
authored
Merge pull request #27 from leonazava/4051
[4051] - scandiPWA version in footer is hardcoded - fixed
2 parents 537ad70 + b6a1d73 commit 4ddba3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Block/Page/Footer.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Footer extends CoreFooter
2323
/**
2424
* ScandiPWA registration theme component name
2525
*/
26-
const SCANDIPWA_COMPONENT_NAME = 'frontend/scandipwa/scandipwa';
26+
const SCANDIPWA_COMPONENT_NAME = 'frontend/scandipwa';
2727

2828
/**
2929
* @var ListInterface
@@ -85,7 +85,7 @@ public function getPackageJsonData() {
8585
$packageData = json_decode(file_get_contents($pathToTheme), true);
8686
$this->scandiPWAPackgeVersion = $this->getScandiPWAFromPackageData($packageData);
8787
} else {
88-
$this->scandiPWAPackgeVersion = false;
88+
$this->scandiPWAPackgeVersion = 'n/a';
8989
}
9090
}
9191

@@ -99,7 +99,7 @@ public function getScandiPWADirectoryPath() {
9999
$themeDirectoryPath = null;
100100

101101
foreach ($this->themeList as $theme) {
102-
if ($theme->getFullPath() === self::SCANDIPWA_COMPONENT_NAME) {
102+
if (str_contains($theme->getFullPath(), self::SCANDIPWA_COMPONENT_NAME)) {
103103
$themeDirectoryPath = $this->componentRegistrar->getPath(
104104
ComponentRegistrar::THEME,
105105
$theme->getFullPath()

0 commit comments

Comments
 (0)