Log in
Factory

TotalFactory

Magento\Sales\Model\Order\TotalFactory

What it does

This factory class creates instances of order total calculator classes that extend AbstractTotal.

Developers use this when they need to dynamically instantiate different total calculation classes (like tax, shipping, discount totals) during order processing.

It provides a centralized way to create total calculator objects with custom parameters.

Public Methods

  • create()