php - How to change language in Stripe - Woocommerce

317

I'm setting up a webshop in Woocommerce and Stripes payment checkout is set to English.

I have tried to read Stripes documentation, and it says that you have to insert a line of codedata-locale="auto" to change the language, but I can't figure out what file I have to add the line of code to.

Where do I add thedata-locale?

676

Answer

Solution:

If you have a child theme you can add this code to the child themefunctions.php file to set the locale to auto.

function tbz_wc_change_stripe_checkout_locale( $locale ) {
    return 'auto';
}
add_filter( 'wc_stripe_checkout_locale', 'tbz_wc_change_stripe_checkout_locale' );

People are also looking for solutions to the problem: Problem with destination in file upload with PHP

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.