Skip to content

Commit

Permalink
Merge pull request #6 from stape-io/feature/fix-cookie-generation-logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Bukashk0zzz authored Dec 22, 2023
2 parents c3c0dfb + 7587934 commit 7b0ea90
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

v1.0.9
- Fixed issue with cookie being re-generated on every page load.

v1.0.2
- Fixed issue with main snippet not showing when cookie keeper enabled

Expand Down
4 changes: 3 additions & 1 deletion Plugin/HttpPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ public function beforeSendResponse(HttpResponse $subject)
return;
}

$cookieValue = $this->cookieManager->getCookie(self::COOKIE_NAME, $this->generateCookieValue());

/** @var \Magento\Framework\App\Request\Http $request */
$this->cookieManager->setPublicCookie(self::COOKIE_NAME, $this->generateCookieValue(), $metadata);
$this->cookieManager->setPublicCookie(self::COOKIE_NAME, $cookieValue, $metadata);
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": [
"GPL-3.0-only"
],
"version": "1.0.8",
"version": "1.0.9",
"require": {
"php": ">=7.4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>

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

0 comments on commit 7b0ea90

Please sign in to comment.