function commerce_customer_profile_copy_refresh in Commerce Core 7
Ajax callback: Returns ajax command to refresh customer profile pane.
1 string reference to 'commerce_customer_profile_copy_refresh'
- commerce_customer_profile_pane_checkout_form in modules/
customer/ includes/ commerce_customer.checkout_pane.inc - Checkout pane callback: returns a customer profile edit form.
File
- modules/
customer/ includes/ commerce_customer.checkout_pane.inc, line 225 - Checkout pane callback functions for the customer module.
Code
function commerce_customer_profile_copy_refresh($form, &$form_state) {
$pane_id = reset($form_state['triggering_element']['#parents']);
$commands = array();
// Render the pane afresh to capture any changes based on address entry.
$commands[] = ajax_command_replace(NULL, drupal_render($form[$pane_id]));
// Allow other modules to add arbitrary AJAX commands on the refresh.
drupal_alter('commerce_customer_profile_copy_refresh', $commands, $form, $form_state);
return array(
'#type' => 'ajax',
'#commands' => $commands,
);
}