Get shipping and billing information from rule I am using the Drupal commerce module. I want to write a PHP script to execute on order completion, and I want that script to update an external database with the shipping information. How would I go about doing this?

I have already setup a rule to execute PHP code on order completion, and I am given the variable $commerce_order, but I don't know what to call to get out the customer shipping information. I have tried to email var_dump($commerce_order) but it does not give me anything.

How can I get a list of the fields? Am I on the right track?
The shipping information isn't directly stored on the order. The only way you have of figuring the shipping details is to look at the line items at $order-&gt;commerce_line_items one or more of them will be shipping line items, which can tell you about the shipping details.