diff --git a/modules/cart/commerce_cart.module b/modules/cart/commerce_cart.module index d562035..12f46e7 100644 --- a/modules/cart/commerce_cart.module +++ b/modules/cart/commerce_cart.module @@ -541,15 +541,8 @@ function commerce_cart_commerce_product_calculate_sell_price_line_item_alter($li global $user; // Reference the current shopping cart order in the line item if it isn't set. - // We load the complete order at this time to ensure it primes the order cache - // and avoid any untraceable recursive loops. - // @see http://drupal.org/node/1268472 - if (empty($line_item->order_id)) { - $order = commerce_cart_order_load($user->uid); - - if ($order) { - $line_item->order_id = $order->order_id; - } + if (empty($line_item->order_id) && $order_id = commerce_cart_order_id($user->uid)) { + $line_item->order_id = $order_id; } }