Log in
Model

GetLatLngFromSource

Magento\InventoryDistanceBasedSourceSelection\Model\DistanceProvider\GetLatLngFromSource

What it does

This class retrieves geographic coordinates (latitude and longitude) from an inventory source.

If the source already has coordinates stored, it returns them directly; otherwise, it constructs an address from the source's location data and geocodes it to obtain the coordinates.

Developers use this when implementing distance-based source selection algorithms that need to calculate distances between inventory sources and shipping destinations.

Public Methods

  • execute()