• Resolved Tirwin

    (@tirwin)


    I am trying to change the “Add a coupon” text on the checkout and basket pages to read something more appropriate for my setup, such as “Redeem a voucher”. Does anyone know what file this text is held in?

Viewing 15 replies - 1 through 15 (of 19 total)
  • Hi @tirwin ,

    You can change the “Add a coupon” text using a translation plugin like Loco Translate. It lets you search for specific strings in WooCommerce and replace them with your preferred wording—like changing “Add a coupon” to “Redeem a voucher”—without editing any code.

    Once installed, just go to Loco Translate → Plugins → WooCommerce, search for the string, and update it to match your setup.

    That said, we’d truly appreciate it if you could leave a review and share your experience:
    https://wordpress.org/support/plugin/woocommerce/reviews/

    Thanks again, and happy selling!

    Thread Starter Tirwin

    (@tirwin)

    Thanks for the response, I’ve done all that but it didn’t change the string on the live site. Think it will be easier if someone can just identify the file that holds the text so I can manually change it.

    Hi @tirwin,

    It’s not recommended to modify text directly in the installation files, as any future update will overwrite your changes. The method suggested by @mahfuzurwp remains the most reliable approach.

    You mentioned you’ve already tried that—just to clarify, were you able to change the string using Loco Translate, but it’s still appearing the same on the frontend? If so, could you please share a screenshot and a link to your site so I can take a closer look?

    @tirwin – You may want to use a code snippet, that uses a filter to change the coupon CTA text

    https://www.businessbloomer.com/woocommerce-change-coupon-code-message-cart-checkout/

    This will require you to be familiar with using code snippets.

    I tested this code snippet on a Playground instance. This also covers the button and placeholder text in the coupon field.

    https://gist.github.com/maxrice/8551024

    Thread Starter Tirwin

    (@tirwin)

    @nagpai thanks for the snippet, not something I’ve used before but a quick google makes it seem not too challenging. I’ll keep this idea on the back burner, very much appreciated.

    @mosesmedh thats a very valid point I hadn’t even considered! So, from what I remember (as it was a few days prior to me posting) I installed Loco -> Selected the plugin “Woocommerce” -> Went to “Edit” under English (the only language option) -> Searched the filter for “Add a coupon” -> Changed to “Redeem A Voucher” in the bottom box and saved. Now when I search for the filter “Add a coupon” it doesn’t come up, and the front end still shows the wrong message. ( http://www.SYKEGraffitiArt.com )

    Hi @tirwin,

    Thank you for the detailed follow-up. I had a look at your checkout and noticed you’re using the WooCommerce Block Checkout — can you confirm if that’s correct?

    From your explanation, there are a few possible reasons why the translation might not be showing:

    • Site language mismatch: If your WordPress site isn’t set to English (United States), WooCommerce may be using a different translation file (like en_GB, es_MX, etc.), and changes to the default English file won’t apply.
    • Incorrect translation context: The phrase “Add a coupon” may belong to a different plugin or block, and not directly from the core WooCommerce text domain.
    • Caching issues: Your browser, server, or CDN may be caching the older version of the text.
    • Theme override: If your theme overrides the template containing that string, changes made via Loco Translate might not apply.

    Let’s try the following steps:

    1. Set your WordPress Site Language and User Profile Language to English (United States).
    2. Try the translation again in Loco Translate and save it.
    3. Clear your browser cache, any site/server-level cache, and your CDN cache if one is active.
    4. Check if the translation is now reflected.

    If that still doesn’t solve it, I recommend trying the Say What? plugin. It allows you to override any string directly, regardless of your current language file.

    If none of these steps work, please share your System Status Report from WooCommerce > Status > Get Report > Copy for Support and paste it on gist.github.com, then send me the link so I can take a closer look.

    Thread Starter Tirwin

    (@tirwin)

    Ok I did all of those things and nothing changed on the front end so I setup a github https://gist.github.com/TirwinBass/827714ccb20c1bff00a4305ae2d8bc0e.js

    Hi @tirwin,

    Thank you for getting back to us. Could you please confirm whether you’ve tried using the “Say What?” plugin?

    Also, the report you shared appears to be incomplete or not copied correctly. Kindly follow the steps below to ensure it’s copied properly.

    If none of these steps work, please share your System Status Report from WooCommerce > Status > Get System Report > Copy for Support and paste it on gist.github.com, then send me the link so I can take a closer look.

    Thread Starter Tirwin

    (@tirwin)

    Yes I tried that app too but with no success.

    Ive changed my language setting back to UK for the moment (Im in the UK) but I’ve followed your steps to create another report https://gist.github.com/TirwinBass/fd76b06ca9eb9c5bf1d654e67a1c9c0c

    Thread Starter Tirwin

    (@tirwin)

    Plugin Support shahzeen(woo-hc)

    (@shahzeenfarooq)

    Hi there!

    Thank you for sharing the system status report. I can see you’re using an older version of WooCommerce. Please update WooCommerce to the latest version — we always recommend using the latest release for optimal compatibility and performance.

    Regarding the translation issue: I tested changing the “Add a coupon” text using both the Say What? plugin and the Loco Translate plugin, and both worked fine on my end.
    Here’s a screenshot showing the text has been successfully updated: https://go.screenpal.com/watch/cTiVF9nlXZs

    If you’re using the Say What? plugin, please ensure you’re entering the correct string:

    • Original string: Add a coupon
    • Text domain: woocommerce

    As shown in this screenshot: https://go.screenpal.com/watch/cTiVF9nlXZG

    Let me know how that goes.

    Thread Starter Tirwin

    (@tirwin)

    @shahzeenfarooq I almost feel like I should apologise for my silly mistake. I hadn’t even noticed there was an update available, I’ve been so focussed on development. I updated, ran Say What? again and it worked first time! I really appreciate your assistance with this, sometimes I get distracted with side quests and forget about the fundamentals hah!

    Plugin Support LovingBro (woo-hc)

    (@lovingbro)

    Hi @tirwin

    Thanks for the follow-up, and I’m really glad to hear the string update worked smoothly after updating WooCommerce. It’s easy to get caught up in development details, and you’re definitely not alone in overlooking an update now and then!

    If WooCommerce has been helpful for your store and you’ve appreciated the support received, we’d truly be grateful if you could leave us a quick 5-star review here: https://wordpress.org/support/plugin/woocommerce/reviews/#new-post

    Your feedback helps us continue improving the experience for everyone. Happy building!

    Thread Starter Tirwin

    (@tirwin)

    Already done! 5 Star service as always, thanks for your help!

Viewing 15 replies - 1 through 15 (of 19 total)

The topic ‘Add A Coupon text’ is closed to new replies.