title: Woocommerce: limit customer to only one category per transaction
body: <p>Wonder if anyone can help.</p>
  
  <p>I want to either find an add-on or create some work of my own that will <strong>only allow a customer to purchase from one category per transaction.</strong></p>
  
  <p>E.g they can buy from category X, but <strong>once they have selected products from that category they can no longer purchase from category Y</strong>. They have to complete the transaction first. I'd obviously require an error message to explain this.</p>
  
  <p>Is there any add-on capable of this? How would you go about this?</p>
  
  <p>This is my current thought plan but I need advice on whether this is the best solution:</p>
  
  <pre><code>1. Loading product page
  
  2. Check cart contents to see if products exist already
  
     a. product already exists in cart = check it's category
  
        i. same category? display "add to cart button"
        ii. not same category? display error message instead of button
  
     b. no product in cart? display "add to cart button"
  </code></pre>