• Resolved tomvanbiesen

    (@tomvanbiesen)


    Hi all,

    we just opened a webshop using Stripe for payments. In the English version of the web, the following error occurs on the checkout page:undefined is not an object (evaluating ‘this.get_currency().toLowerCase’)
    This only happens on the English version, not on the original Spanish one. It only occurs when Apple Pay is enabled.

    Any thoughts?

    Kind regards
    Tom

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Payment Plugins

    (@mrclayton)

    Hi @tomvanbiesen,

    I reviewed your checkout page and it looks like you have Apple Pay disabled at the moment. Are you able to activate it so I can take a look?

    If you have a staging site where this can be re-produced that works as well.

    The Credit Card and GPay gateways use the same code base and they are not showing that error. Where or are you using page caching on your checkout page?

    Kind Regards,

    Thread Starter tomvanbiesen

    (@tomvanbiesen)

    Hi @mrclayton

    I will enable Apple Pay.
    About caching, I have no idea, this is the first time I’ve built a website/woocommerce shop, you are really talking to a newbie here 😅.
    I don’t use any caching plugins if that is what you mean.

    Thanks in advance

    Kind regards
    Tom

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @tomvanbiesen,

    I am reviewing your site now. The issue is for some reason the jQuery data function call is not returning a JSON object when Woocommerce reloads the checkout page html.

    It is always supposed to return a JSON object so I am trying to figure out why that would be.

    What plugin are you using for your language switcher?

    Kind regards,

    Thread Starter tomvanbiesen

    (@tomvanbiesen)

    hi @mrclayton

    I’m using TranslatePress.

    Kind regards
    Tom

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @tomvanbiesen,

    So the issue is during the update_checkout when English is selected the data returned is in an invalid JSON format so jQuery cannot parse it. Here is the invalid JSON:

    "{"items":[{"label":"Bolsita Jabu00f3n "Yute"","pending":false,"amount":455},{"label":"Shipping","pending":false,"amount":0}],"shipping_options":[],"total":"4.55","total_cents":455,"currency":"EUR","needs_shipping":true}"

    Here is a valid JSON String when English is not selected:

    "{"items":[{"label":"Bolsita Jabón \"Yute\"","pending":false,"amount":455},{"label":"Shipping","pending":false,"amount":0}],"shipping_options":[],"total":"4.55","total_cents":455,"currency":"EUR","needs_shipping":true}"

    Notice in the invalid string that Yute is not escaped like \"Yute“`.

    I am not sure why the escaping doesn’t work when English is selected because the code is the same in the Stripe plugin regardless of selected language.

    I am trying to re-produce on my end.

    Kind Regards,

    Plugin Author Payment Plugins

    (@mrclayton)

    Hi @tomvanbiesen,

    Can you reach out to me via the Help button located in the Stripe plugin settings pages? I believe I have the resolution but would like you to test it.

    Kind Regards,

    Thread Starter tomvanbiesen

    (@tomvanbiesen)

    I have sent a message through the help function

    Kind regards
    Tom

    Plugin Author Payment Plugins

    (@mrclayton)

    Setting to resolved. Issue was related to the translation plugin the merchant was using.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘undefined is not an object (evaluating ‘this.get_currency().toLowerCase’)’ is closed to new replies.