Log in
Interface

StoreSwitcherInterface

Magento\Store\Model\StoreSwitcherInterface

What it does

This interface defines the contract for handling store switching operations in Magento 2.

Developers use implementations of this interface when they need to switch customers between different store views (e.g., changing language or region) and determine the appropriate redirect URL after the switch.

It ensures the customer lands on the correct equivalent page in the target store.

Public Methods

  • switch()