How do I programmaticaly get the name/ID of the shipping method for an order? I need to get the name of the shipping method for a given order in my module. I have the id of the order. After I get the shipping info by means of commerce_customer_profile_load($commerce_order-&gt;commerce_customer_shipping['und'][0]['profile_id']) i do get the info about the address, but I do wonder how to get the name / id of the shipping method.
I found a good answer at https://drupalcommerce.org/discussions/8274/get-shipment-services-object-flat-rate-order-object     

// Be sure there are line_items
if (!empty($order-&gt;commerce_line_items["und"])){
  $line_items = array();
  // Gather together the IDs of the line items
  foreach($order-&gt;commerce_line_items["und"] AS $line_item){
    $line_items[] = $line_item["line_item_id"];
  }
  // load_multiple allows us to use $conditions so we only load the entity of type "shipping"
  $shipping_line_item = commerce_line_item_load_multiple($line_items, array('type' =&gt; "shipping"), FALSE);
}