Log in
Model

ProductWebsiteLinkRepository

Magento\Catalog\Model\ProductWebsiteLinkRepository

What it does

This repository class manages the assignment of products to websites in a multi-website Magento 2 installation.

Developers use this class to programmatically add or remove website associations for products, which is essential when managing product visibility across different store websites.

It provides a clean API interface for website-product relationship management without directly manipulating product data.

Public Methods

  • save()
  • delete()
  • deleteById()