Title: Generate Coupon Programmatically
Last modified: April 13, 2022

---

# Generate Coupon Programmatically

 *  [daneloctober](https://wordpress.org/support/users/daneloctober/)
 * (@daneloctober)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/generate-coupon-programmatically/)
 * Hi!
 * I was just wondering, is there a way to create a coupon programmatically?
 * I’m planning to send it via email. The idea is, once people finish a certain 
   course (via LearnDash plugin most likely), they will receive a certificate, and
   also a coupon code.
 * Is there a way to do this?
 * Thank you!

Viewing 1 replies (of 1 total)

 *  Plugin Author [Brian](https://wordpress.org/support/users/brianjessee/)
 * (@brianjessee)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/generate-coupon-programmatically/#post-15557079)
 * Hi,
 * Thanks for the interest in the Coupon Creator Plugin.
 * There is not an easy way to create a coupon programmatically.
 * It could be done as it is a custom post type, but all the meta data would have
   to be manually saved.
 * I might be able to help answer some specific questions about it, but limited 
   beyond that.
 * Let me know.
 * Thanks
 * Brian

Viewing 1 replies (of 1 total)

The topic ‘Generate Coupon Programmatically’ is closed to new replies.

 * ![](https://ps.w.org/coupon-creator/assets/icon.svg?rev=2688941)
 * [Coupon Creator](https://wordpress.org/plugins/coupon-creator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/coupon-creator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/coupon-creator/)
 * [Active Topics](https://wordpress.org/support/plugin/coupon-creator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/coupon-creator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/coupon-creator/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Brian](https://wordpress.org/support/users/brianjessee/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/generate-coupon-programmatically/#post-15557079)
 * Status: not a support question