This patch allows developers to alter/add AJAX commands when users select another address of the address book.

Usage example:

function MYMODULE_commerce_addressbook_callback_alter(&$commands, $form, $form_state) {
  $commands[] = ajax_command_alert('it works!');
}

I used it to add some custom javascript.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz’s picture

Status: Needs review » Needs work

The new alter needs to be documented in commerce_addressbook.api.php.

jeff.maes’s picture

Status: Needs work » Needs review
FileSize
1.82 KB

Now including documentation in commerce_addressbook.api.php

bojanz’s picture

Title: Allows developers to alter/add commands on AJAX callback when selecting other address » Allow developers to alter AJAX commands when selecting an address
Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.