I realize that this is a generic Drupal issue, but this came up while I was working on a UC project, and it was new to me as I've only being doing Drupal and UC work for about 18 months, so I just wanted to bring it up (I'm sure I'm not the first) to:
1. Make sure others know this might possibly happen, especially when developing custom UC code
2. See if anyone has run into this and how it was solved.
We were building custom code to do some things during the order process by using UC's hook_order calls. We kept having $1 added to every single order as a line item, with no apparent reason for this addition. After several hours of hunting, I found the culprit. it was a function in a non-UC related custom module that had also been named like '_order', so it was mycustommodule_order(). The developer was returning a value of true in his custom code, and this was being interpreted as 1 by UC, so $1 was added to the order. Fortunately we had full control of this other module and renamed that function.
During my testing I also found that the 'order' function in the 'event' module is called with every single call to UC's hook_order, which illustrates the problem we were having. Since there isn't really any formal namespacing in 'hookable' functions, if you name a custom function and it matches a hook called from any other module, your function is going to run. So, it is pretty easy to solve, I supposed, just embed the name of your custom module in the function name.
