static function CommerceGoogleTagManagerHelper::getWrappedOrder in Commerce Google Tag Manager 7.2
Wraps the give order, if needed, to a EntityMetadataWrapper object.
Parameters
array|stdClass $order The Order object or array:
Return value
2 calls to CommerceGoogleTagManagerHelper::getWrappedOrder()
- CommerceGoogleTagManagerActionCheckout::execute in includes/
rules/ CommerceGoogleTagManagerActionCheckout.php - Executes the action.
- CommerceGoogleTagManagerActionPurchase::execute in includes/
rules/ CommerceGoogleTagManagerActionPurchase.php - Executes the action.
File
- includes/
CommerceGoogleTagManagerHelper.php, line 16 - This file contains the helper class CommerceGoogleTagManagerHelper.
Class
- CommerceGoogleTagManagerHelper
- @file This file contains the helper class CommerceGoogleTagManagerHelper.
Code
static function getWrappedOrder($order) {
if (!$order instanceof EntityMetadataWrapper) {
return entity_metadata_wrapper('commerce_order', $order);
}
return $order;
}