Ok, here's an unforeseen problem. hook_order() gets invoked w/ the 'submit' $op in the submit function for the checkout review page. If any hook function returns a failure, then the cart won't let the customer check out (example: in the credit module, if a store charges cards at checkout and the card doesn't process, it fails out). So, if you're using a payment method or gateway that bypasses the normal review screen (like PayPal Express Checkout or Website Payments Standard), it won't get fired off. 
I see this as a problem... but I also see this as a necessary place for this particular $op to be passed. I'm up for brainstorming on ways to fix it. Or perhaps you should consider using a different $op. For example, you could use 'update' and check the order's status... when it gets updated to
<?php
uc_get_order_status_id('in_checkout');
?>from
<?php
uc_get_order_status_id('post_checkout');
?>you could decrement the inventory level. This wouldn't work for all cases, like when an administrator adds a product to an order from the backend. So you may even consider using the 'save' $op and logging when an order's items have been removed from inventory... Just a thought.

Joined: 08/07/2007