title: Make company name not required WooCommerce (3rd party plugin)
body: <p>I'd like to make billing company and shipping company not required in WooCommerce. For some reason the code I am using works for EVERYTHING except for the company part. <strong>It turns out a third party plugin is making the company name required, here is the full code of that plugin:</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  if ( ! defined( 'ABSPATH' ) ) {
      exit;
  }
  
  
  require_once('legacy_pakkelabels_shipping_main.php');
  
  /**
   * @class   Pakkelabels_Shipping_GLS_Business_Legacy
   * @version  0.1.0
   * @author   Magnus Vejlø - Pakkelabels
   */
  class Legacy_Pakkelabels_Shipping_GLS_Business extends Legacy_Pakkelabels_Shipping_Main
  {
  
      public function __construct($instance_id = 0)
      {
          $this-&gt;id = 'legacy_pakkelabels_shipping_gls_business';
          $this-&gt;instance_id = absint($instance_id);
          $this-&gt;method_title = __('GLS Business ', 'woocommerce-pakkelabels');
          $this-&gt;method_description = __('Adds the option to ship with the GLS business to the checkout', 'woocommerce-pakkelabels');
          $this-&gt;init();
      }
  
  
      /* add the diffrent actions */
      function addActions()
      {
          //adds the shipping method to the WooCommerce
          add_filter('woocommerce_shipping_methods', array($this, 'register_shipping_method'));
  
          add_action('woocommerce_after_shipping_rate', array($this, 'pakkelabels_shipping_gls_business_show_below_shipping'));
  
          add_action('woocommerce_checkout_process', array($this, 'pakkelabels_shipping_gls_business_field_process'));
      }
  
  
      function addFilters()
      {
  
      }
  
  
      function pakkelabels_shipping_gls_business_field_process() {
  
          global $woocommerce;
          $choosen_shipping_method1 = preg_replace('/\d/', '', $woocommerce-&gt;session-&gt;chosen_shipping_methods[0] );
          $choosen_shipping_method2 = preg_replace('/\d/', '', $woocommerce-&gt;session-&gt;chosen_shipping_methods );
          if((isset($_POST['ship_to_different_address']) &amp;&amp;  ($_POST['shipping_company'] == '' || !isset($_POST['shipping_company']))) &amp;&amp; ($choosen_shipping_method1 == "legacy_pakkelabels_shipping_gls_business" || $choosen_shipping_method2 == "legacy_pakkelabels_shipping_gls_business")){
              if ( version_compare( $woocommerce-&gt;version, '2.1', '&lt;' ) ) {
                  $woocommerce-&gt;add_error(__('Please fill out the Shipping company', 'woocommerce-pakkelabels'));
              } else {
                  wc_add_notice( __('Please fill out the Shipping company', 'woocommerce-pakkelabels') , 'error');
              }
          }
          if((!isset($_POST['ship_to_different_address']) &amp;&amp; ($_POST['billing_company'] == '' || !isset($_POST['billing_company']))) &amp;&amp; ($choosen_shipping_method1 == "legacy_pakkelabels_shipping_gls_business" || $choosen_shipping_method2 == "legacy_pakkelabels_shipping_gls_business")){
              if ( version_compare( $woocommerce-&gt;version, '2.1', '&lt;' ) ) {
                  $woocommerce-&gt;add_error(__('Please fill out the billing company', 'woocommerce-pakkelabels'));
              } else {
                  wc_add_notice( __('Please fill out the billing company', 'woocommerce-pakkelabels') , 'error');
              }
          }
      }
  
  
  
  
      function pakkelabels_shipping_gls_business_show_below_shipping($rate){
          global $woocommerce;
  
          global $woocommerce;
          $choosen_shipping_method1 = preg_replace('/\d/', '', $woocommerce-&gt;session-&gt;chosen_shipping_methods[0] );
          $choosen_shipping_method2 = preg_replace('/\d/', '', $woocommerce-&gt;session-&gt;chosen_shipping_methods );
          if($choosen_shipping_method1 == "legacy_pakkelabels_shipping_gls_business" || $choosen_shipping_method2 == "legacy_pakkelabels_shipping_gls_business"){
              if($rate-&gt;method_id == 'legacy_pakkelabels_shipping_gls_business'){
                  echo '&lt;div class="gls_shipping_method_text shipping_company_required"&gt;'  . __('The company name is required.', 'woocommerce-pakkelabels').'&lt;/div&gt;';
              }
          }
      }
  
  
      /* Register the shipping method in WooCommerce*/
      function register_shipping_method($methods)
      {
          $methods['legacy_pakkelabels_shipping_gls_business'] = 'Legacy_Pakkelabels_Shipping_GLS_Business';
          return $methods;
      }
  }
  
  
  $pakkelabels_GLS_Business_Legacy = new Legacy_Pakkelabels_Shipping_GLS_Business();
  $pakkelabels_GLS_Business_Legacy-&gt;mainAddActions();
  $pakkelabels_GLS_Business_Legacy-&gt;addActions();
  $pakkelabels_GLS_Business_Legacy-&gt;addFilters();</code></pre>
  </div>
  </div>
  </p>
  
  <p>The plugin used is a delivery plugin, and since we're delivering to companies it requires a company name. However, since we are a B2B store we already have these company names registered and we do not want them nor need them in the checkout. So we have hidden the company name field in WooCommerce, but no matter what code we write we cannot make it not require it to be filled out.</p>