• Resolved carloeucandido

    (@carloeucandido)


    When I try to apply a discount code, jQuery fails to show success text.
    Firefox console debugger gives a sintax error: “missing ) after argument list”
    related to this line: else {$("#pmpro_message").html(responseHTML);}
    Moreover, one of my customers reported an error type 1:
    “Error applying discount code [1]” , still don’t know if the customer didn’t apply the code correctly or it’s part of this bug

    This bug (if it’s really a bug) it’s not related to the latest version, because now I’ve installed 2.04 but when I noticed it (this morning) I had one of the previous versions of PMpro (not 2.03 but I can’t remember which one)
    I’m sure that in the past the code was working on my website
    Thank you in advance

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Andrew Lima

    (@andrewza)

    Hi there,

    Thank you for using Paid Memberships Pro, I have just tested this and I am unable to recreate this issue on my end.

    Are you using any plugin that may affect JQuery such as minification or load a different jQuery version?

    Could you please create a new discount code and retest this for me and let me know if the issue persists.

    Thread Starter carloeucandido

    (@carloeucandido)

    Hi Andrew and thank you for your kind reply

    I’ve SOLVED!

    – I already tried with different discount codes, old ones and a new one.
    – Yes, there’s a minification.. but the problem is not there

    Solution: in italian we use apostrophes… a lot! So the translation of the success string contained an apostrophe and it wasn’t escaped when string is loaded into jquery script!
    I removed the contraction mark and now it works…. but now my question becomes: is there any other case where this issue could occur? How many strings could be affected?

    Probably some time ago I changed my .po file and I didn’t realize I triggered an error, neither my users reported it to me

    Plugin Author Andrew Lima

    (@andrewza)

    Thanks for the feedback, I have added this to our development schedule to try and avoid this issue when a discount code contains certain characters.

    I don’t think there are any other ways for this error to occur, if you find other ways please do let me know.

    Thread Starter carloeucandido

    (@carloeucandido)

    Ok Andrew but please note that it’s not about special characters inside the discount code BUT inside the strings associated to discount codes processing, and their translation in the .po / .mo files. So in my opinion any other string passed to jQuery and not escaped for special char could be affected. I’m not a programmer so please forgive me if I’ve written something obvious or wrong.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Discount codes bug?’ is closed to new replies.