Last active
October 21, 2015 12:18
-
-
Save MatthieuScarset/cb683060e36bb117febf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$order_id = 8442; // change this to your order_id value | |
$order = commerce_order_load($order_id); | |
$shipping_profile_id = $order->commerce_customer_shipping[LANGUAGE_NONE][0]['profile_id']; | |
$address_shipping_profile = commerce_customer_profile_load($shipping_profile_id); | |
$as = $address_shipping_profile->commerce_customer_address['und'][0]; | |
$billing_profile_id = $order->commerce_customer_billing[LANGUAGE_NONE][0]['profile_id']; | |
$address_billing_profile = commerce_customer_profile_load($billing_profile_id); | |
$ab = $address_billing_profile->commerce_customer_address['und'][0]; | |
dpm($order); | |
dpm($as, 'Shipping address'); | |
dpm($ab, 'Billing address'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment