PHP Variables when writing rule I am writing some php code to update an external database with the shipping and billing information after the order is complete, so I am writing a rule on checkout complete that adds the customer information to the database.  I need to figure out what is contained in the variables that I want to use (eg. $commerce_order->???) how would I figure this out, and is there a reference list anywhere that I can use?
If you simply want to find out what is inside $commerce_order then you can use

&lt;?php echo var_dump($commerce_order);?&gt;


I have made a module in the past that did a simerler thing to what you are trying to do. 
Using Ubercart I created a module that took advantage of the hook_order function.

&lt;?php 
function myFunction_uc_order($ops, &amp;$arg1, $arg2){
    global $user;
    $userId = $user-&gt;uid;
    if ($ops = 'update' &amp;&amp; $arg1-&gt;order_status == "payment_received" &amp;&amp; $arg2 =="completed"){
        $order = uc_order_load($orderId);
        //$order now contains all order information for the current order
    }
}
?&gt;


This code will be run every time an order is "updated", this includes being created. So inside the if you can add your code to export to your 'external' database.

Hope this helps