• Resolved ibl92

    (@isabella92)


    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 to see the link]

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

    (@indreshyadav)

    hello
    @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

    (@isabella92)

    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

    (@indreshyadav)

    hello,
    @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.