Log in
Model

CleanTargetUrl

Magento\Store\Model\StoreSwitcher\CleanTargetUrl

What it does

This class is responsible for cleaning up store-switching related parameters from URLs during the store view switching process in Magento 2.

Developers would use this class when they need to ensure that internal parameters like '___from_store' and store codes are removed from redirect URLs after a customer switches between different store views, preventing these technical parameters from being exposed or causing issues in the target URL.

Public Methods

  • switch()