function commerce_shipping_commerce_customer_profile_copy_refresh_alter in Commerce Shipping 7.2
Implements hook_commerce_customer_profile_copy_refresh_alter().
File
- ./
commerce_shipping.module, line 1147 - Defines a system for calculating shipping costs associated with an order.
Code
function commerce_shipping_commerce_customer_profile_copy_refresh_alter(&$commands, $form, $form_state) {
// Add an AJAX command to click the shipping recalculation button after the
// customer clicks a profile copy button.
if (!empty($form['commerce_shipping']['recalculate'])) {
$commands[] = ajax_command_invoke(NULL, 'commerceCheckShippingRecalculation', array());
}
}