function commerce_shipping_update_7003 in Commerce Shipping 7.2
Same name and namespace in other branches
- 7 commerce_shipping.install \commerce_shipping_update_7003()
Rename the shipping_method field on the shipping line item.
File
- ./
commerce_shipping.install, line 113 - Contains update hooks for the commerce_shipping module.
Code
function commerce_shipping_update_7003(&$sandbox) {
// This should actually never be run on 2.x but is here for reference.
/*
commerce_shipping_line_item_configuration(array('type' => 'shipping'));
foreach (commerce_line_item_load_multiple(FALSE, array('type' => 'shipping')) as $line_item) {
$line_item_wrapper = entity_metadata_wrapper('commerce_line_item', $line_item);
$line_item_wrapper->commerce_shipping_method = $line_item_wrapper->shipping_method->value();
$line_item_wrapper->save();
}
field_delete_field('shipping_method');
*/
}