Title: plugin issue with default WooCommerce coupon functionality
Last modified: December 11, 2025

---

# plugin issue with default WooCommerce coupon functionality

 *  [nmavra](https://wordpress.org/support/users/nmavra/)
 * (@nmavra)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-issue-with-default-woocommerce-coupon-functionality/)
 * We have two custom snippets that create a coupon for the first order of a user
   and for when they first register to the site.
   However, we noticed that when the
   Yith Gift Card plugin is activated the coupons are not created.
 * The user gets a mail notification for their new coupon code, but there isn’t 
   one created in Woocommerce.
   If we deactivate the plugin, everything works fine.
 * We are using    $coupon = new WC_Coupon(); {..all the coupon settings..} $coupon-
   >save(); and the coupon is not created.
 * Any suggestions?
 * I’ve shared the credentials from the website in question in your ticket #313570
    -  This topic was modified 5 months, 3 weeks ago by [nmavra](https://wordpress.org/support/users/nmavra/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Juan Coronel](https://wordpress.org/support/users/juaancmendez/)
 * (@juaancmendez)
 * [5 months, 3 weeks ago](https://wordpress.org/support/topic/plugin-issue-with-default-woocommerce-coupon-functionality/#post-18753856)
 * Hello there,
   thanks for contacting us!
 * I’m sorry, but we only request administrator access to your site through our 
   premium support. We don’t provide that type of support here.
 * If you’d like, you can share the custom code you created so I can try to review
   it on my installation.
 * Best regards.
 *  Thread Starter [nmavra](https://wordpress.org/support/users/nmavra/)
 * (@nmavra)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/plugin-issue-with-default-woocommerce-coupon-functionality/#post-18754730)
 * I have already replied to this, as shown here “This topic was modified 1 day,
   20 hours ago by [nmavra](https://wordpress.org/support/users/nmavra/).” seeing
   as at the type of writing now you reply is “Juan Coronel (@juaancmendez) 19 hours,
   25 minutes ago” but my reply has been deleted.
 * Who deleted my post?
 *  Thread Starter [nmavra](https://wordpress.org/support/users/nmavra/)
 * (@nmavra)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/plugin-issue-with-default-woocommerce-coupon-functionality/#post-18754734)
 * Anyway, here is our snippet
 * [https://pastebin.com/fCushpy9](https://pastebin.com/fCushpy9)
 *  Moderator [Support Moderator](https://wordpress.org/support/users/moderator/)
 * (@moderator)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/plugin-issue-with-default-woocommerce-coupon-functionality/#post-18754775)
 * No post has been archived here. Your addition can be seen in your first post 
   in this topic. However, you mention here that you have provided credentials. 
   This is not permitted here in the forum as it violates the guidelines. Similarly,
   if you are a premium user, questions about the plugin are also [not permitted in the forum](https://wordpress.org/support/guidelines/#do-not-post-about-commercial-products).
 *  Thread Starter [nmavra](https://wordpress.org/support/users/nmavra/)
 * (@nmavra)
 * [5 months, 2 weeks ago](https://wordpress.org/support/topic/plugin-issue-with-default-woocommerce-coupon-functionality/#post-18754877)
 * Hey super admin, I had a whole snippet that I added as a reply to Juan’s comment,
   and this one has either been deleted or somehow not posted. It does not really
   matter though, luckily I noticed it.
 * The bug I’m reporting is for the FREE version and it is 100% reproduceable using
   the snippet above.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fplugin-issue-with-default-woocommerce-coupon-functionality%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/yith-woocommerce-gift-cards/assets/icon-256x256.gif?rev=
   3227932)
 * [YITH WooCommerce Gift Cards](https://wordpress.org/plugins/yith-woocommerce-gift-cards/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-gift-cards/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-gift-cards/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-gift-cards/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-gift-cards/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-gift-cards/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [nmavra](https://wordpress.org/support/users/nmavra/)
 * Last activity: [5 months, 2 weeks ago](https://wordpress.org/support/topic/plugin-issue-with-default-woocommerce-coupon-functionality/#post-18754877)
 * Status: not resolved