ProductScopeRewriteGenerator
Magento\CatalogUrlRewrite\Model\ProductScopeRewriteGenerator
What it does
This class generates URL rewrites for products across different store scopes (global, website, or store view) in Magento 2.
Developers use it when products need SEO-friendly URLs created or regenerated, especially when products are associated with categories or when URL keys change across different store views.
It handles the complexity of generating both canonical product URLs and category-based product URLs according to the configured scope settings.
Public Methods
- isGlobalScope()
- generateForGlobalScope()
- generateForSpecificStoreView()
- isCategoryProperForGenerating()