Log in
Model

AbstractCarrier

Magento\Shipping\Model\Carrier\AbstractCarrier

What it does

AbstractCarrier is the base class for all shipping carrier implementations in Magento 2.

Developers extend this class when creating custom shipping methods or integrating with third-party carriers like UPS, FedEx, or USPS.

It provides common functionality for configuration management, rate calculations, handling fees, shipment requests, and country/address validation that all carriers need.

Public Methods

  • getConfigData()
  • getConfigFlag()
  • requestToShipment()
  • returnOfShipment()
  • getContainerTypes()
  • getCustomizableContainerTypes()
  • getDeliveryConfirmationTypes()
  • checkAvailableShipCountries()
  • processAdditionalValidation()
  • proccessAdditionalValidation()
  • isActive()
  • isFixed()
  • isTrackingAvailable()
  • isShippingLabelsAvailable()
  • getSortOrder()
  • getFinalPriceWithHandlingFee()
  • getTotalNumOfBoxes()
  • isStateProvinceRequired()
  • isCityRequired()
  • isZipCodeRequired()
  • getDebugFlag()
  • debugData()
  • getCarrierCode()
  • getContentTypes()