Repository Forums Support WooCommerce Extended Coupon Features PRO Overriding Error Message

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #15261
    Heidi Maskelyne

    I cannot use custom error message since using “is_first_purchase” I have 2 different types on messages

    Instead of:
    msgid "Sorry, it seems the coupon \"%s\" is not yours.

    i want to display:
    msgid "Sorry, it seems the coupon \"%s\" is not yours. Please Ensure You Are Logged Into Your Account"

    if i override the error message in miscellaneous it will display for both logged in and non logged in and will also display that error message for first purchase.

    Ideally changing the pot file should work but it doesn’t how can i change the txt string in pot file for it to work I only use English and do not want to use translate plugin


    You can override the text by using gettext filter. It looks like this plugin does the trick:

    I haven’t tested it.

    Heidi Maskelyne

    i have already tried gettext filter and does not work at all

    also the plugin does not work either

    i managed to fix by editing error.php in woocommerce templates adding below

       if (strpos($message, '" is not yours.') !== false) {
            $message = $message.'<br><br><b> PLEASE LOGIN INTO YOUR ACCOUNT TO USE THIS COUPON</b>'; //updated error string

    Thanks Anyway for your help

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.