title: Remove Woocommerce "place order" button for a specific shipping class
body: <p>I have a scenario where I need to remove the "Place order" button on the checkout screen for Woo-commerce.</p>
  
  <p>Currently I have 2 shipping methods: Flexible shipping and Freight</p>
  
  <p>If a customer adds an item with the shipping class of "Freight" to their cart, my current code disables the flexible shipping method and then the freight method displays a message of "Call for current rates".</p>
  
  <p>The issue is that they can still checkout essentially without paying anything for shipping which is why if freight is the only shipping method available I need the place order button to be removed or replaced.</p>
  
  <p>Here is the code I am currently using and trying to modify unsuccessfully:</p>
  
  <pre><code>add_filter( 'woocommerce_package_rates', 'wc_hide_free_shipping_for_shipping_class', 10, 2 );
  
  function wc_hide_free_shipping_for_shipping_class( $rates, $package ) {
      $shipping_class_target = 332; 
      $in_cart = false;
  
      foreach( WC()-&gt;cart-&gt;cart_contents as $key =&gt; $values ) {
          if( $values[ 'data' ]-&gt;get_shipping_class_id() == $shipping_class_target ) {
  $in_cart = true;
  break;
          } 
      }
      if( $in_cart ) {
          unset( $rates['flexible_shipping_7_2'] );
      }
      return $rates;
  }
  </code></pre>
  
  <p>Is there a simple hook or something I'm missing? </p>
  
  <p>I've been messing with this for a while and am hitting a wall.</p>