Log in
Model

StoreSwitcher

Magento\Store\Model\StoreSwitcher

What it does

This class manages the store switching process in Magento 2 when customers switch between different store views or websites.

It orchestrates multiple store switcher implementations to transform the redirect URL appropriately for the target store, ensuring customers land on the correct page after switching stores.

Developers use this when customizing store view switching behavior or adding custom URL transformation logic.

Public Methods

  • switch()