function commerce_avatax_commerce_cart_order_refresh in Drupal Commerce Connector for AvaTax 7.5
Implements hook_commerce_cart_order_refresh().
Calculate taxes on order refresh in order to properly take in account discounts.
File
- ./
commerce_avatax.module, line 368 - AvaTax service integration from Avalara, Inc.
Code
function commerce_avatax_commerce_cart_order_refresh($order_wrapper) {
// Skip the request if there are no line items.
if ($order_wrapper->commerce_line_items
->count() === 0) {
return;
}
commerce_avatax_calculate_tax($order_wrapper);
}