How do I create a url that adds a coupon to the cart?

That’s easy! First find the url of the landingpage you want theĀ url to link to. For example:

http://www.mysite.com/cart/

Then append ?apply_coupon=coupon_code

http://www.mysite.com/cart/?apply_coupon=coupon_code

Optionally, to add a product using the same url, you can append &add-to-cart=1234 where 1234 is the id of a product. You can find the id of a product on the WooCommerce Products-page.

http://www.mysite.com/cart/?apply_coupon=coupon_code&add-to-cart=1234