Load Address from order
I'm completely unfamiliar with the Entity API and am struggling to get hold of some fairly straightforward data from the order object - the billing address.
I've tried the code snippet suggested by Ryan:
$order = commerce_order_load($order_id);
$wrapper = entity_metadata_wrapper('commerce_order', $order);
$address = $wrapper->commerce_customer_billing->commerce_customer_address->value();
This gives me the following error:
EntityMetadataWrapperException: Unknown data property commerce_customer_address. in EntityStructureWrapper->getPropertyInfo() (line 328 of /[path to site]/profiles/commerce_kickstart/modules/entity/includes/entity.wrapper.inc).
I'm a little bit lost and I'm man enough to admit it. Who can give me a pointer?