Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#2 | commerce_google_analytics_drupal_alter.patch | 790 bytes | stella |
commerce_google_analytics_drupal_alter.patch | 966 bytes | stella |
Comments
Comment #1
CyberschorschThis 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.
Comment #2
stella CreditAttribution: stella commentedUpdated patch attached.
Comment #3
CyberschorschWorks good. Marking as RTBC.
Comment #4
Cyberschorsch