Skip to content

Commit

Permalink
Merge branch '5.x' of github.com:craftcms/commerce into 5.x
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
nfourtythree committed May 29, 2024
2 parents 9c718b2 + 8d7faed commit 2d4e975
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Fixed missing validation for Inventory Location handles. ([#3511](https://github.com/craftcms/commerce/issues/3511))
- Fixed a bug where an Order’s shipping method name could be cleared when saving a completed order with a shipping method provided by a plugin. ([#3519](https://github.com/craftcms/commerce/issues/3519))
- Fixed a PHP error that could occur when initializing Craft Commerce.
- Fixed a SQL error that could occur when switching sites with a cart cookie set. ([#3522](https://github.com/craftcms/commerce/issues/3522))
- Fixed an error that could occur when attempting to save a variant with special characters. ([#3516](https://github.com/craftcms/commerce/issues/3516))

## 5.0.7 - 2024-05-22
Expand Down
4 changes: 3 additions & 1 deletion src/services/Carts.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,11 @@ public function init()
{
parent::init();

$currentStore = Plugin::getInstance()->getStores()->getCurrentStore();

// Complete the cart cookie config
if (!isset($this->cartCookie['name'])) {
$this->cartCookie['name'] = md5(sprintf('Craft.%s.%s', self::class, Craft::$app->id)) . '_commerce_cart';
$this->cartCookie['name'] = md5(sprintf('Craft.%s.%s.%s', self::class, Craft::$app->id, $currentStore->handle)) . '_commerce_cart';
}

$request = Craft::$app->getRequest();
Expand Down

0 comments on commit 2d4e975

Please sign in to comment.