Skip to content

Instantly share code, notes, and snippets.

@zdenko
zdenko / dc_emw.php
Created November 22, 2016 03:34 — forked from BBGuy/dc_emw.php
Working with Drupal commerce entities using entity_metadata_wrapper. Just a bunch of exampled copied from the web or added by me. will keep adding over time.
<?php
// order.
$order_wrapper = entity_metadata_wrapper('commerce_order', $order);
// Order id.
$order_id = order_wrapper->order_id->value();
// User detils.