Update wc-invoice.php

Cleaned up Detecting WC version & Maintain Compatibility with 1.6.6 and 2.0 sections; RE: Check if WooCommerce is active, moved close '}' to the last line of code; updated syntax to unset 'session.'