title: Wordpress functions.php won't save using unset() PHP function
body: <p>I have the unset function in my functions.php theme file and WordPress no longer allows me to save my code in the editor.</p>
  
  <p>I'm using it to unset product tabs on WooCommerce as per this code (found on the WooCoomerce site - <a href="https://docs.woocommerce.com/document/editing-product-data-tabs/" rel="nofollow noreferrer">https://docs.woocommerce.com/document/editing-product-data-tabs/</a>):</p>
  
  <pre><code>add_filter( 'woocommerce_product_tabs', 'custom_remove_product_tabs', 98 );
  function custom_remove_product_tabs( $tabs ) {
      unset( $tabs['description'] ); // Remove the description tab
      return $tabs;
  }
  </code></pre>
  
  <p>With this code in I get the generic error of: "Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP." when saving my functions.php file. If I comment out the line with the unset function is saves just fine.</p>
  
  <p>It does work on the site if I save this code using FTP etc so I appreciate some may say just do that, but I like to quickly edit things inside WordPress sometimes which is no longer possible so want to understand why it's happening (and WordPress have docs on using this function themselves so it's driving me mad!). I've tried adding a standard php unset function with a generic variable to check it's not WooCommerce related but this doesn't work either.</p>
  
  <p>Am I missing something? If not, is it a server setting? We're using PHP 7.4 on a litespeed server so should be up to date. I'm not sure if there is a way to see a more detailed error log from this issue so if there is any help finding it would be great.</p>
  
  <p>Thanks for any help! </p>