Skip to content

Commit 1ff6ff9

Browse files
CrossDomain confirma only when Multistore Active
If GA_CROSSDOMAIN_ENABLED is not set, Tools::getValue('GA_CROSSDOMAIN_ENABLED') will return False, then $gaCrossdomainEnabled is assigned to False. In turn (null !== $gaCrossdomainEnabled) is True because (null !== False).
1 parent bcfbc14 commit 1ff6ff9

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

classes/Form/ConfigurationForm.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ public function generate()
204204
*/
205205
public function treat()
206206
{
207+
// Check if multistore is active
208+
$is_multistore_active = Shop::isFeatureActive();
209+
207210
$treatmentResult = '';
208211
$gaAccountId = Tools::getValue('GA_ACCOUNT_ID');
209212
$gaUserIdEnabled = Tools::getValue('GA_USERID_ENABLED');
@@ -223,7 +226,7 @@ public function treat()
223226
$treatmentResult .= $this->module->displayConfirmation($this->module->getTranslator()->trans('Settings for User ID updated successfully', [], 'Modules.GAnalytics.Admin'));
224227
}
225228

226-
if (null !== $gaCrossdomainEnabled) {
229+
if ($is_multistore_active) {
227230
Configuration::updateValue('GA_CROSSDOMAIN_ENABLED', (bool) $gaCrossdomainEnabled);
228231
$treatmentResult .= $this->module->displayConfirmation($this->module->getTranslator()->trans('Settings for User ID updated successfully', [], 'Modules.GAnalytics.Admin'));
229232
}

0 commit comments

Comments
 (0)