You are here

function hook_uc_addresses_address_update in Ubercart Addresses 7

Same name and namespace in other branches
  1. 6.2 uc_addresses.api.php \hook_uc_addresses_address_update()

This hook allows you to respond to updates to an address.

Parameters

UcAddressesAddress $address: The address object.

Return value

void

File

./uc_addresses.api.php, line 273
These hooks are invoked by the Ubercart Addresses module. @todo more documentation needed for hook_uc_addresses_field_handlers(). @todo Document the rest of the API.

Code

function hook_uc_addresses_address_update($address) {

  // Example: get the value of my custom field and update it in my own table.
  $record = array(
    'aid' => $address
      ->getId(),
    'myfield' => $address
      ->getField('myfield'),
  );
  drupal_write_record('mydbtable', $record, array(
    'aid',
  ));
}