Skip to content

Commit 7b0ea90

Browse files
authored
Merge pull request #6 from stape-io/feature/fix-cookie-generation-logic
2 parents c3c0dfb + 7587934 commit 7b0ea90

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
v1.0.9
4+
- Fixed issue with cookie being re-generated on every page load.
5+
36
v1.0.2
47
- Fixed issue with main snippet not showing when cookie keeper enabled
58

Plugin/HttpPlugin.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ public function beforeSendResponse(HttpResponse $subject)
115115
return;
116116
}
117117

118+
$cookieValue = $this->cookieManager->getCookie(self::COOKIE_NAME, $this->generateCookieValue());
119+
118120
/** @var \Magento\Framework\App\Request\Http $request */
119-
$this->cookieManager->setPublicCookie(self::COOKIE_NAME, $this->generateCookieValue(), $metadata);
121+
$this->cookieManager->setPublicCookie(self::COOKIE_NAME, $cookieValue, $metadata);
120122
}
121123
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": [
66
"GPL-3.0-only"
77
],
8-
"version": "1.0.8",
8+
"version": "1.0.9",
99
"require": {
1010
"php": ">=7.4.0"
1111
},

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22

33
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
4-
<module name="Stape_Gtm" schema_version="1.0.8" setup_version="1.0.8">
4+
<module name="Stape_Gtm" schema_version="1.0.8" setup_version="1.0.9">
55
<sequence>
66
<module name="Magento_Backend" />
77
<module name="Magento_Catalog" />

0 commit comments

Comments
 (0)