Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | commerce_addessbook_ajax_callback_alter-1490780-2.patch | 1.82 KB | jeff.maes |
commerce_addressbook_ajax_callback_alter.patch | 827 bytes | jeff.maes |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedThe new alter needs to be documented in commerce_addressbook.api.php.
Comment #2
jeff.maes CreditAttribution: jeff.maes commentedNow including documentation in commerce_addressbook.api.php
Comment #3
bojanz CreditAttribution: bojanz commentedCommitted, thanks.