Log in
Model

CommentCreation

Magento\Sales\Model\Order\Invoice\CommentCreation

What it does

This class is a data transfer object (DTO) used when creating comments for invoices in Magento 2.

Developers use this class to set comment text, control whether the comment is visible on the storefront, and attach extension attributes when programmatically creating invoice comments through the Sales API.

It implements the InvoiceCommentCreationInterface to ensure consistent comment creation across the system.

Public Methods

  • getComment()
  • setComment()
  • getIsVisibleOnFront()
  • setIsVisibleOnFront()
  • getExtensionAttributes()
  • setExtensionAttributes()