You are here

function hook_uc_addresses_address_insert in Ubercart Addresses 7

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

This hook allows you to respond to creation of a new address.

Parameters

UcAddressesAddress $address: The address object.

Return value

void

File

./uc_addresses.api.php, line 256
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_insert($address) {

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