I'm trying to make an extension that allows the user to choose from a list of shipping and billing addresses that they have previously entered. I'm using the store_order_complete_end hook listed here https://www.exp-resso.com/docs/extension_hooks.html but I can't access the addresses in the $order object because the $order->attributes object is a protected attribute. Is there any other way to get the addresses for the order?

public function my_store_order_complete_end($order) {
    $vars = $order->attributes; // undefined as it's protected

1 Answer 1


All of the customer attributes are actually accessible as direct members of the $order object:



  • Thanks Derek. I didn't see those in the var_dump oddly enough but it works.
    – Patrick64
    Mar 20, 2015 at 12:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.