Changed the use of global $woocommerce var, a little cleaner and more common way of working with globals in WP.
WordPress Coding Standards optimizations.
Fixed issue with get_terms returning false.