public static function woocp_product_featured_tab_woo_2_0($tabs = array())
 {
     global $product, $post;
     global $woo_compare_product_page_tab;
     $compare_featured_tab = trim($woo_compare_product_page_tab['compare_featured_tab']);
     if ($compare_featured_tab == '') {
         $compare_featured_tab = __('Technical Details', 'woo_cp');
     }
     $show_compare_featured_tab = false;
     $product_id = $post->ID;
     $variations_list = WC_Compare_Functions::get_variations($product_id);
     if (is_array($variations_list) && count($variations_list) > 0) {
         foreach ($variations_list as $variation_id) {
             if (WC_Compare_Functions::check_product_activate_compare($variation_id) && WC_Compare_Functions::check_product_have_cat($variation_id)) {
                 $compare_category = get_post_meta($variation_id, '_woo_compare_category', true);
                 $compare_fields = WC_Compare_Categories_Fields_Data::get_results("cat_id='" . $compare_category . "'", 'cf.field_order ASC');
                 if (is_array($compare_fields) && count($compare_fields) > 0) {
                     $show_compare_featured_tab = true;
                     break;
                 }
             }
         }
     } elseif (WC_Compare_Functions::check_product_activate_compare($product_id) && WC_Compare_Functions::check_product_have_cat($product_id)) {
         $compare_category = get_post_meta($product_id, '_woo_compare_category', true);
         $compare_fields = WC_Compare_Categories_Fields_Data::get_results("cat_id='" . $compare_category . "'", 'cf.field_order ASC');
         if (is_array($compare_fields) && count($compare_fields) > 0) {
             $show_compare_featured_tab = true;
         }
     }
     if ($show_compare_featured_tab) {
         $tabs['compare-featured'] = array('title' => esc_attr(stripslashes($compare_featured_tab)), 'priority' => $woo_compare_product_page_tab['auto_compare_featured_tab'], 'callback' => array('WC_Compare_Hook_Filter', 'woocp_product_featured_panel_woo_2_0'));
     }
     return $tabs;
 }
 /**
  * Add a product or variations of product into compare widget list
  */
 public static function add_product_to_compare_list($product_id)
 {
     $product_list = WC_Compare_Functions::get_variations($product_id);
     if (count($product_list) < 1 && WC_Compare_Functions::check_product_activate_compare($product_id) && WC_Compare_Functions::check_product_have_cat($product_id)) {
         $product_list = array($product_id);
     }
     if (is_array($product_list) && count($product_list) > 0) {
         if (isset($_COOKIE['woo_compare_list'])) {
             $current_compare_list = (array) unserialize($_COOKIE['woo_compare_list']);
         } else {
             $current_compare_list = array();
         }
         foreach ($product_list as $product_add) {
             if (!in_array($product_add, $current_compare_list)) {
                 $current_compare_list[] = (int) $product_add;
             }
         }
         setcookie("woo_compare_list", serialize($current_compare_list), 0, COOKIEPATH, COOKIE_DOMAIN, false, true);
     }
 }