Title: Regarding warning text when using discount code
Last modified: February 14, 2020

---

# Regarding warning text when using discount code

 *  Resolved [ibl92](https://wordpress.org/support/users/isabella92/)
 * (@isabella92)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/regarding-warning-text-when-using-discount-code/)
 * Hello!
 * I have noticed that if I write a discount code more than once at checkout (perhaps
   because I went to add another product and come back to checkout) I will get a
   warning message saying ”discount code aldready used”, but the discount code will
   still be applied. Just wondering if you know if this is a message that can be
   removed and never shown?
 * Best regards,
    Isabella
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fregarding-warning-text-when-using-discount-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [indreshyadav](https://wordpress.org/support/users/indreshyadav/)
 * (@indreshyadav)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/regarding-warning-text-when-using-discount-code/#post-12435471)
 * hello
    [@isabella92](https://wordpress.org/support/users/isabella92/) Are you
   using WooCommerce-3.9.1? if “discount code aldready used” message is showing 
   when you trying to place order then you can use following code. It will help 
   you.
 *     ```
       add_filter(‘woocommerce_hold_stock_for_checkout’, ‘test_coupon_time’);
   
       function test_coupon_time() {
       return false;
       }
       ```
   
 *  Thread Starter [ibl92](https://wordpress.org/support/users/isabella92/)
 * (@isabella92)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/regarding-warning-text-when-using-discount-code/#post-12435517)
 * Hello!
 * Thanks for your quick reply!
    I am not very good at coding, where exactly do 
   I put this code?
 * Do I go to the specific page, in our case /svea-checkout?
    Or do I go to WordPress–
   Appearance – Woocommerce – Checkout?
 * This is Javascript right? Maybe it is better if I can have a html code that hides
   this text so there is no risk for it messing with other functions?
 *  [indreshyadav](https://wordpress.org/support/users/indreshyadav/)
 * (@indreshyadav)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/regarding-warning-text-when-using-discount-code/#post-12437046)
 * hello,
    [@isabella92](https://wordpress.org/support/users/isabella92/) This is
   the php code.go to theme functions.php and paste that code.

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

The topic ‘Regarding warning text when using discount code’ is closed to new replies.

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

 * 3 replies
 * 2 participants
 * Last reply from: [indreshyadav](https://wordpress.org/support/users/indreshyadav/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/regarding-warning-text-when-using-discount-code/#post-12437046)
 * Status: resolved