title: Apply WooCommerce coupon based on Variable
body: <p>I have setup a Coupon code in WooCommerce, called COUPON100, it has an ID of 200.</p>
  
  <p>During the checkout, I'd like to adjust the coupon discount amount depending on a variable.
  e.g</p>
  
  <pre><code>if ($username == 'John') &amp;&amp; ($code == 'COUPON100'){
  $amount = 50;
  }
  else if ($username == 'John') &amp;&amp; ($code == 'COUPON100'){
  $amount = 70;
  else { $amount = 30}
  }
  </code></pre>