The drupal_alter() function can only take 3 arguments, but the last one can be an array of additional contexts. See the API docs at http://api.drupal.org/api/drupal/includes!module.inc/function/drupal_alt...

This means currently it's not possible to access $order in hook_commerce_google_analytics_item_alter().

Patch to fix this attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Cyberschorsch’s picture

Status: Needs review » Needs work

This patch is not working since the paths are not correct. The path needs to be set to the module path instead of the drupal root path.

stella’s picture

Status: Needs work » Needs review
FileSize
790 bytes

Updated patch attached.

Cyberschorsch’s picture

Status: Needs review » Reviewed & tested by the community

Works good. Marking as RTBC.

Cyberschorsch’s picture

Status: Reviewed & tested by the community » Closed (fixed)