Hooks
Last updated on
9 May 2017
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
This is an overview of the hooks provided by Ubercart Addresses. For more detailed information, see the file uc_addresses.api.php (which is included with the module).
- hook_uc_addresses_field_handlers()
- Register new field handlers to be used by fields in address edit forms. See also the field handler API.
- hook_uc_addresses_fields()
- Register extra address fields to be used in address edit forms. See also the field handler API.
- hook_uc_addresses_fields_alter()
- Alter the field definitions of field registered through hook_uc_addresses_fields().
- hook_uc_addresses_address_field_alter()
- Alter the uc_addresses_address form element. This form element is the address edit form itself and consist of address fields registered through hook_uc_addresses_fields().
- hook_uc_addresses_preprocess_address_alter()
- Alter the address field listing before it's displayed. This hook is invoked on pages where addresses are displayed, such as on the address book page.
- hook_uc_addresses_address_load()
- Invoked when an address is loaded from the uc_addresses table in the database.
- hook_uc_addresses_address_presave()
- Invoked when an address is about to be saved to uc_addresses table in the database.
- hook_uc_addresses_address_insert()
- Invoked when an address is inserted in the uc_addresses table.
- hook_uc_addresses_address_update()
- Invoked when an address is updated in the uc_addresses table.
- hook_uc_addresses_address_delete()
- Invoked when an address is deleted from the address book and/or the uc_addresses table.
- hook_uc_addresses_may_view()
- This hook allows you to prevent a certain address from being viewed. Invoked when address permissions are checked through the UcAddressesPermissions class. Only use this hook if your use case needs specific address access control.
- hook_uc_addresses_may_edit()
- This hook allows you to prevent a certain address from being edited. Invoked when address permissions are checked through the UcAddressesPermissions class. Only use this hook if your use case needs specific address access control.
- hook_uc_addresses_may_delete()
- This hook allows you to prevent a certain address from being deleted. Invoked when address permissions are checked through the UcAddressesPermissions class. Only use this hook if your use case needs specific address access control.
- hook_uc_addresses_select_addresses()
- Provide a list of addresses from which the customer can select one at checkout or the admin when editing or creating an order manually.
- hook_uc_addresses_select_addresses_alter()
- Alter the list of selectable addresses provided through hook_uc_addresses_select_addresses().
- hook_uc_addresses_format_address_alter()
- Alter the address format before it's being processed. This hook exists in the 7.x-1.x version only, but will be backported to 6.x-2.x in the future.
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion