Log in
Model

ManageStoreCookie

Magento\Store\Model\StoreSwitcher\ManageStoreCookie

What it does

This class manages store view cookies during store switching operations in Magento 2.

When a customer switches between different store views, it either sets or deletes the store cookie depending on whether the target store is the default store view.

Developers use this class to ensure the customer's selected store view persists across their browsing session.

Public Methods

  • switch()