Log in
Model

CreateEmptyCartForGuest

Magento\QuoteGraphQl\Model\Cart\CreateEmptyCartForGuest

What it does

This model creates an empty shopping cart for guest (non-logged-in) customers in Magento 2's GraphQL API.

Developers use this class when implementing GraphQL mutations for guest checkout flows, allowing guests to initiate a cart session with either an auto-generated or predefined masked quote ID for security purposes.

Public Methods

  • execute()