Added if class_exists for WooCommerce

Added if class_exists for WooCommerce to make sure that plugin is
enabled before doing anything of theme custom WooCommerce magic.