public function UcAddressesAddressBook::getDefaultAddress in Ubercart Addresses 6.2
Same name and namespace in other branches
- 7 class/UcAddressesAddressBook.class.php \UcAddressesAddressBook::getDefaultAddress()
Returns a default address.
@access public
Parameters
string $type: The address type to get (shipping, billing).
Return value
UcAddressesAddress if the address is found. NULL otherwise.
1 call to UcAddressesAddressBook::getDefaultAddress()
- UcAddressesAddressBook::setAddressAsDefault in class/
UcAddressesAddressBook.class.php - Set an address as a default address.
File
- class/
UcAddressesAddressBook.class.php, line 681 - Contains the UcAddressesAddressBook class.
Class
- UcAddressesAddressBook
- The address book class
Code
public function getDefaultAddress($type = 'billing') {
if (isset($this->defaultAddresses[$type])) {
return $this->defaultAddresses[$type];
}
if (!$this->defaultsLoaded) {
$this
->loadDefaults();
}
if (isset($this->defaultAddresses[$type])) {
return $this->defaultAddresses[$type];
}
return NULL;
}