title: WooCommerce hook for "after payment complete" actions
body: <p>I'm using WooCommerce and Wordpress. I have a custom license key generator, and I'd like it to generate a license key when someone successfully purchases my plugin through WooCommerce.</p>
  
  <p>It seems pretty straight-forward:</p>
  
  <ol>
  <li>User completes checkout on my site</li>
  <li>User is re-directed to Paypal, where they enter their payment credentials</li>
  <li>Paypal tells my site that the payment is complete</li>
  <li>I hook in to some sort of "payment complete" or "order_complete" WooCommerce action and generate the license.</li>
  </ol>
  
  <p>Here's the problem: I'm really not sure what hook would work well for this. Woocommerce has their <a href="http://docs.woothemes.com/document/hooks/" rel="noreferrer">entire collection of hooks</a> listed on their site, but virtually no documentation about which is good for what.</p>
  
  <p>Based on just the hook names, I'd think that <code>woocommerce_payment_complete</code> would be a good action to use. Unfortunately it doesn't seem to be fired at all; some places I've read say that it isn't ever fired.</p>
  
  <p>I've also read something about Paypal IPN, but I don't understand how I could hook in to the notification from that (does that connect to a Woocommerce hook?)</p>
  
  <p>In short, I'd like to generate the license key as soon as the payment has been verified. What do I hook in to in order to achieve this?</p>