title: Display or hide custom tab on product page depending on variable
body: <p>I am trying to hide a display or not display a tab on the single product page depending on the value of $sizeGridNumber. So if this value is 1 or empty, I want the tab not to display. I return an empty array, but it generates errors.</p>
  
  <pre><code>/*Customise additional-information tab (Size Grid)*/
  add_filter( 'woocommerce_product_tabs', 'wpb_custom_additional_information_tab', 98 );
  function wpb_custom_additional_information_tab( $tabs ) {
      global $post;
      // var_dump($post-&gt;ID);
      $sizeGridNumber = get_post_meta( $post-&gt;ID, '_selectsizeguide', true );
      $sku = get_post_meta( $post-&gt;ID, '_sku', true );
      // echo '&lt;br/&gt;';
      // var_dump($sizeGridNumber);
      // print_r($sizeGridNumber);
      // var_dump($sku);
   //    print_r($sku);
      if ( $sizeGridNumber == 1 || $sizeGridNumber == "") {
          echo "on passe";
          return array();
      } else {
          $tabs['additional_information']['callback'] = 'wpb_custom_additional_information_tab_content'; // Custom additional_information callback
          return $tabs;
      }
  }
  </code></pre>