title: Woocommerce - PHP if statement based on shipping class
body: <p>I have a site with a few large items and I have set shipping classes to handle some items.</p>
  
  <p>What I would like to do is setup an "if" statement on specific product pages to add a little message. For example, on certain products I have to ship via UPS, so I want to be able to add a little note explaining this. It would be nice if this were automatically added every time I added my UPS class from the dropdown menu in the product page. </p>
  
  <p>I did have something like this: </p>
  
  <pre><code>&lt;?php if ( $product-&gt;get_shipping_class('ups') ) : ?&gt;
  
              &lt;span class="sku_wrapper shipping_wrapper"&gt; This product is too large and must be shipped via UPS. Contact us for details&lt;/span&gt;
  
          &lt;?php else : ?&gt;
  
              &lt;span class="sku_wrapper shipping_wrapper"&gt; Standard Shipping&lt;/span&gt;
  
          &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>However, if  I tried to add more classes this wouldn't work... Clearly the function i'm using isn't correct, as chanigng out ('ups') for something different doesn't work. </p>
  
  <p>Can anyone help please? This is on the single product page in woocommerce. </p>