348c348
<  * Invoke the methods pf the current shipping scheme to calculate shipping cost.
---
>  * Invoke the methods of the current shipping scheme to calculate shipping cost.
354,355c354,355
< function shipping_calculate_cost($item) {
<   return module_invoke(variable_get("shipping_method", ""), "shippingapi", $item, "calculate");
---
> function shipping_calculate_cost(&$txn) {
>   return module_invoke(variable_get("shipping_method", ""), "shippingapi", $txn, "calculate");
417c417
< function shipping_calculate($items) {
---
> function shipping_calculate(&$txn) {
424c424
<     foreach ($items as $item) {
---
>     foreach ($txn->items as $item) {
429c429
<     foreach ($items as $item) {
---
>     foreach ($txn->items as $item) {
