woothemes/woocommerce — pull request #5822 by helgatheviking (2014-07-09 20:40:18+00:00)
Title: add_to_cart() return $cart_item_key

make the `add_to_cart()` method return `$cart_item_key` instead of `true`. This will be helpful for product types that are a container for other product types... I'm working on a "pack/case" for mixing and matching products are various quantities. For example if I manually call `add_to_cart()` I'd like to save the newly added item's cart key as cart data for the parent item.

In a cursory look, I don't see any conditional checks in core that test the result of `add_to_cart()` but if there are they should still work as expected unless they're checking for a boolean type.