title: Prevent repeat purchases of a product variation using WooCommerce
body: <p>I've setup a WooCommerce variable product with a 'Free Trial' and 'Single Payment' option. I want to stop repeat purchases of the trial product for obvious reasons.</p>
  
  <p>The following example shows how this can be done: <a href="https://gist.github.com/bekarice/0143d1b423857b0c6885" rel="nofollow noreferrer">https://gist.github.com/bekarice/0143d1b423857b0c6885</a></p>
  
  <p>This example works as described with a products ID (which is set with the following variables):</p>
  
  <pre><code>$non_purchasable = 356;
  $no_repeats_id = 356;  
  </code></pre>
  
  <p>Unfortunately the code seemingly doesn't work when the above variables are set to the specific products 'free trial' variation ID. </p>
  
  <p>Is there a way to modify the above example to work with a products specific variation ID? </p>