Log in
Model

Option\Repository

Magento\Catalog\Model\Product\Option\Repository

What it does

This class manages product custom options in Magento 2, providing CRUD operations for retrieving, creating, updating, and deleting product options.

Developers use this repository when they need to programmatically manage custom options (like text fields, dropdowns, etc.) that customers can select when purchasing a product, either through custom modules, API integrations, or data import scripts.

Public Methods

  • getList()
  • getProductOptions()
  • get()
  • delete()
  • duplicate()
  • save()
  • deleteByIdentifier()