function hook_commerce_cart_order_refresh in Commerce Core 7
Allows modules to perform additional processing to refresh a shopping cart order's contents.
When an order is loaded, if it is in a shopping cart order status, its contents are refreshed to get the current product prices. This prevents users from checking out orders with stale contents. The API function commerce_cart_order_refresh() takes care of product line item updates, but this hook can be used for any additional updates.
Modules that implement this hook do not need to save changes to the order, as the Cart module will save the order after invoking the hook.
Parameters
$order_wrapper: The entity metadata wrapper for the order being refreshed.
See also
1 invocation of hook_commerce_cart_order_refresh()
- commerce_cart_order_refresh in modules/
cart/ commerce_cart.module - Refreshes the contents of a shopping cart by finding the most current prices for any product line items on the order.
File
- modules/
cart/ commerce_cart.api.php, line 154 - Hooks provided by the Cart module.
Code
function hook_commerce_cart_order_refresh($order_wrapper) {
// No example.
}