WooCommerce Coupon Messages

This extension has been discontinued.

Customized Coupon Messages for WooCommerce

Coupon Messages Menu Item

This extension for WooCommerce allows to override the default messages for coupons.

WooCommerce 2.x is required!

Generic messages and error messages can be overridden for coupons in general and also per coupon.

Use more informative messages than Coupon does not exist!, Please enter a coupon code. … and many other default messages. Use HTML to provide links to useful pages and inform potential customers about offers and alternatives!

Here’s an example that overrides the rather boring Coupon code applied successfully. message:

Customized Message Example - Coupon Applied

If a customer tries to apply a coupon code that doesn’t exist, help them find the right one instead of just saying Coupon does not exist!:

Customized Message Example - Coupon Does Not Exist

Many other possibilities are available, messages can be changed for all coupons in general and for individual coupons you can also define specific messages.

Documentation

See more details on this extension’s Documentation page.


Comments

14 responses to “WooCommerce Coupon Messages”

  1. Perfect answer to my issue and keeps the filter out of functions file.

    I’m using it for ‘Gift Card Number” on the check out page. If the coupon is deleted using the little link in the totals bottom area of the checkout totals block woo generates a message ” Coupon has been removed.” that does not seem to be covered by your plug-in.

    Honestly, I was doing the message thing before using filters, and could never find the correct hook to eleiminate it.

    Any ideas?

    Thank you again for a perfect little plug-in.

    Purchase Code – (edited) – 2 Dec 2016

    1. Hi Montie,

      Actually this message is a translatable string. If you’re interested in having a look yourself, you will find the string in this class method WC_AJAX::remove_coupon()wc_add_notice( __( 'Coupon has been removed.', 'woocommerce' ) );. It isn’t offered through the plugin itself as it is not part of the message constants for coupons. An added difficulty, if the string were translated, we wouldn’t be sure if it were to be changed or not when using the applicable filters. I think for this it would be easiest if you just used a translation filter and check for the string “Coupon has been removed.” to substitute it with your preferred wording. Does that help?

      Cheers

      1. nilesh Avatar

        hey Kento,
        thanx for wc_add_notice( __( ‘Coupon has been removed.’, ‘woocommerce’ ) ); method

        1. You’re welcome 🙂

  2. I don’t see any place to change the message if a coupon being applied to a cart that exceeds the MAXIMUM amount — there’s one for MINIMUM.

    1. Hi Steve,
      That’s true! If you add this code in your functions.php, you should have this option:
      function my_woocommerce_coupon_messages_error_codes ( $messages ) {
      $messages[] = WC_Coupon::E_WC_COUPON_MAX_SPEND_LIMIT_MET;
      return $messages;
      }
      add_filter( 'woocommerce_coupon_messages_error_codes', 'my_woocommerce_coupon_messages_error_codes' );

      Kind Regards,
      Antonio B.

  3. The plugin installed correctly however, no messages are appearing. only same “insert coupon code”

    1. Hi Mark,

      I’ve responded to your email and also to your comment and rating on CodeCanyon – quoting:

      Hi,

      Following up on your review and comment:

      We have fully tested our plugin and made sure that it does work indeed. Your posting a review without giving us a chance to even help you or check your settings does not help us or you and we would appreciate it if you would give us at least the chance to try to help before you evaluate our work.

      Could you please explain what settings you are using and what exactly you want to achieve? Also if there is any part in the documentation that we can help you with, we’ll be happy to do so. You can also provide admin access to the site and we can check your settings – if you want us to have a look, please provide admin credentials to support at itthinx dot com and make sure to include a link or mention of this conversation.

      Cheers,
      Kento

  4. Brian Clifton Avatar
    Brian Clifton

    Thanks Antonio – I think the confusion comes form the screenshot of tokens on this page http://docs.itthinx.com/document/woocommerce-coupon-messages/, compared to the plugin setup page i.e. the order of [amount] and [coupon_amount] in the list is switch and I wasn’t paying close enough attention (maybe its a test!)

    Anyhow, many thanks for clarifying

    Brian

    1. antonio Avatar
      antonio

      That’s true.
      I’ll change it, thanks.
      Regards

  5. Purchased and working – sort of…

    Fails when trying to use multiple tokens in the displayed message – only first one completes. See:

    https://brianclifton.com/shop/product/successful-analytics-book/?apply_coupon=davidv2015

    1. antonio Avatar
      antonio

      Hi Brian,
      the token is [coupon_amount] not [amount].
      Regards,
      Antonio B.

  6. Hi

    I bought this yesterday and want to use it but it does not work.

    When I activate the plugin there is a tab for it under coupons, but the page itself is blank. There are no options or fields shown where you can do anything, just a blank page.

    Also activating it then causes blank pages to occur under your other coupon plugs like Groups, Roles, Expiration that I have already installed.

    When you deactivate the Coupons Messages plugin they go back to normal.

    1. antonio Avatar

      Hi,
      you can try:
      1.- Enable debugging for WordPress, in wp-config.php add/change these lines:
      define( ‘WP_DEBUG’, true );
      define( ‘WP_DEBUG_LOG’, true );
      2.- Visit the page generating the error.
      3. Disable debugging
      define( ‘WP_DEBUG’, false );
      define( ‘WP_DEBUG_LOG’, false );
      4. Please post the contents of the file wp-content/debug.log through pastebin.com or send us to support at itthinx dot com
      thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

Share