Log in
Model

AddProductsToWishlist

Magento\Wishlist\Model\Wishlist\AddProductsToWishlist

What it does

This class handles adding multiple products to a customer's wishlist in Magento 2.

Developers use this when implementing wishlist functionality, particularly for GraphQL or custom implementations where products need to be added programmatically with proper error handling and validation.

It manages buy request options, product validation, and returns a structured output with success/error information.

Public Methods

  • execute()