Commit b9f90284 authored by googletorp's avatar googletorp

Issue #2309359 by pnigro, jkopel, googletorp: Cannot retrieve UPS and USPS...

Issue #2309359 by pnigro, jkopel, googletorp: Cannot retrieve UPS and USPS shipping rates in back end
parent 757083c1
......@@ -801,6 +801,10 @@ function commerce_shipping_line_item_title($line_item) {
function commerce_shipping_line_item_add_form($form, &$form_state) {
// Collect the available shipping rates for this order.
$order = $form_state['commerce_order'];
// If possible load the order, since it sometimes is in a stale state.
if (!empty($order->order_id)) {
$order = commerce_order_load($order->order_id);
}
commerce_shipping_collect_rates($order);
// Store the available rates in the form.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment