public function ShipmentManagerInterface::selectDefaultRate in Commerce Shipping 8.2
Selects the default rate for the given shipment.
Parameters
\Drupal\commerce_shipping\Entity\ShipmentInterface $shipment: The shipment.
\Drupal\commerce_shipping\ShippingRate[] $rates: The available rates.
Return value
\Drupal\commerce_shipping\ShippingRate The selected rate.
1 method overrides ShipmentManagerInterface::selectDefaultRate()
- ShipmentManager::selectDefaultRate in src/
ShipmentManager.php - Selects the default rate for the given shipment.
File
- src/
ShipmentManagerInterface.php, line 44
Class
- ShipmentManagerInterface
- Manages shipments.
Namespace
Drupal\commerce_shippingCode
public function selectDefaultRate(ShipmentInterface $shipment, array $rates);