auto-insert coupon code from URL into checkout

This code snippet will grab the coupon code from the URL (?coupon_code=CODE) and automatically insert it into the checkout page.