shopp_address()

get an address record

shopp_address ( $id, $type )

@param int $id (required) the address id to retrieve, or customer id
@param string $type (optional default:billing) 'billing' to lookup billing address by customer id, 'shipping' to lookup shipping adress by customer id, or 'id' to lookup by address id
@return Address object

Description

get an address record

Example

Lookup address by address id

// say you know the address id is 123
$address = shopp_address(123);

Lookup shipping address by customer id

// get the current customer
$Customer = shopp_customer();

$address = shopp_address($Customer->id, 'shipping');

Lookup billing address by customer id

// get the current customer
$Customer = shopp_customer();

$address = shopp_address($Customer->id, 'billing');

See Also

You must be logged in to post a comment.

© Ingenesis Limited. Shopp™ is a registered trademark of Ingenesis Limited.

Skip to toolbar