woothemes/woocommerce — pull request #5034 by syaiful6 (2014-03-04 09:58:11+00:00)
Title: Implements Iterator and Countable to WC Cart

Please see https://github.com/woothemes/woocommerce/pull/5018, this is just re pull request because my repo not up to date. :)

This make our class WC_Cart can be iterate just like an array, when you iterate the object WC_Cart you get array that equal with WC_Cart::$cart_contents or WC_Cart::get_cart(), example: https://github.com/woothemes/woocommerce/pull/5018.

If you want count the cart content you also can do like this `count( WC()->cart )`