• Resolved susiedavis

    (@susiedavis)


    What is the best way of adding the ‘notranslate’ class to the currency symbol tags in Woocommerce? Is it possible to do this in the functions file?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    The best way is to use our paid version: https://gtranslate.io/#pricing

    You can also modify your HTML code to add notranslate class. First you need to find in your theme where it has:

    <p class="price"><span class="woocommerce-Price-amount amount">

    and change it to be:

    <p class="price notranslate"><span class="woocommerce-Price-amount amount">

    or

    <p class="price"><span class="woocommerce-Price-amount amount notranslate">

    You can also do that with javascript code. Something like:

    jQuery('.price').addClass('notranslate')

    or

    jQuery('.woocommerce-Price-amount').addClass('notranslate')

    You need to add it somewhere in your theme to be executed with every page load.

    Thanks! ??

    Thread Starter susiedavis

    (@susiedavis)

    Many thanks for the reply. The currency symbol occurs in many places – the product page, the cart, mini-cart and checkout so I’m struggling to update the code so that all occurrences are skipped. I’d also like it to be done in a way that it won’t be overwritten when we update the Woocommerce plugin. Do you offer coding services to help us make the changes?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Skip currency symbol translation in Woocommerce’ is closed to new replies.