Hide cart when empty [closed]

Just add another AND (&&) clause to the end of it.

<?php if ( is_woocommerce_activated() && isset( $woo_options['woocommerce_header_cart_link'] ) && 'true' ==     $woo_options['woocommerce_header_cart_link'] && sizeof( $woocommerce->cart->cart_contents ) !== 0) {...}

Probably best to take a look at some of the PHP tutorials or documentation around as you will be coming up against this type of syntax regularly.