public function Shipment::getShippingMethodId in Commerce Shipping 8.2
Gets the shipping method ID.
Return value
int|null The shipping method ID, or NULL if unknown.
Overrides ShipmentInterface::getShippingMethodId
1 call to Shipment::getShippingMethodId()
- Shipment::prepareFields in src/
Entity/ Shipment.php - Ensures that the package_type and weight fields are populated.
File
- src/
Entity/ Shipment.php, line 176
Class
- Shipment
- Defines the shipment entity class.
Namespace
Drupal\commerce_shipping\EntityCode
public function getShippingMethodId() {
return $this
->get('shipping_method')->target_id;
}