• Resolved Xen

    (@aloveyu)


    is anyone here knows how to change the text field label from the credit card form of woocommerce using the functions.php or any other plugin? I like to change the following text:

    Use a new card
    Card Number
    Expiration (MM/YY)
    Card Security Code
    Securely Save to Account

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @aloveyu,

    Great question. It should be possible to change these using a translation plugin like Loco Translate. You can use it to create a translation of these text “strings” into the language of your choice.

    Let us know if you have any questions.

    Thread Starter Xen

    (@aloveyu)

    hi @3sonsdevelopment thank you for your time. I wanted to create a default label text for credit card form. is there a chance to change the existing default label text of credit card form through functions.php?

    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hi @aloveyu,

    Good question. As far as I know, there isn’t a filter we can use to change these. Since they are set up for translation we can use that system to change the text.

    You could try using the method outlined in this post to see if that will work for you.

    https://justabill.blog/change-a-wordpress-string-without-a-plugin/

    Take care

    Thread Starter Xen

    (@aloveyu)

    hi @3sonsdevelopment thank you so much the code works perfectly.

    • This reply was modified 2 years, 11 months ago by Xen.
    Thread Starter Xen

    (@aloveyu)

    hi @3sonsdevelopment unfortunately all text I wanted to changed are already been replace except the “Place Order” button, even I changed it on the functions.php, when I run the code, the Place Order returns to its original text. and also I’ve noticed that error messages can’t change also?

    • This reply was modified 2 years, 11 months ago by Xen.
    Plugin Support 3 Sons Development – a11n

    (@3sonsdevelopment)

    Hey @aloveyu,

    It’s possible that the Place Order button text is changed dynamically with JavaScript. In that case, it wouldn’t be possible to change the text this way. The snippet I mentioned would only affect things at the time the page loads. If it’s changed after that, then this would not work.

    That also applies to error messages. Those are added with JavaScript as needed. Most likely a translation plugin would be the best way to handle both of these. We often point people to Loco Translate but there are others that would work too.

    Take care

    Thread Starter Xen

    (@aloveyu)

    hi @3sonsdevelopment still the issues are not been fix.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Changing the default credit card form text field label to different language’ is closed to new replies.