title: Change Flat Rate shipping cost based on attribute values count in WooCommerce
body: <p>I'm trying to specify 2 different Flat rates shipping methods costs without using a plugin:</p>
  
  <ul>
  <li>If there is a product in the cart from only one Vendor, the Flat rate shipping cost needs to be £19. </li>
  <li>If there are multiple products in the cart from more than one Vendor, the Flat rate shipping cost needs to be £39.</li>
  </ul>
  
  <p>I have tried various plugins, but they focus on shipping rates based on size, weight, quantity, location, category, but not Attributes or Terms.</p>
  
  <p>I have an Attribute named <strong>Vendor</strong> with 8 Terms. Each Term is a different Vendor/supplier.</p>
  
  <p>Here's the type of PHP logic I would like to implement:</p>
  
  <pre><code>if product attribute term quantity = 1
  
  then flat rate = £19
  
  else
  
  if product attribute term quantity &gt; 1
  
  then flat rate = £39
  </code></pre>
  
  <p>How can I change this "Flat rate" shipping method cost when there is more than 1 attribute Vendor terms in cart?</p>