Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

This topic contains 5 replies, has 2 voices.

Last updated by Mateus Getulio 1 year, 3 months ago.

Assisted by: Mateus Getulio.

Author Posts
March 14, 2024 at 2:50 pm #15410796

kamenB-2

Hello. I use WooCommerce PayPal Payments - Version 2.5.4. I want to add translation on the title and description for the second language, but it's not working. I tried to folow the steps here: https://wpml.org/forums/topic/cannot-translate-woocommerce-paypal-payments/, but nothing change. I added and admin texts for the translation, but the texts are not translated, too. Can you help me with the translation?

March 14, 2024 at 3:30 pm #15411125

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello,

Can you please provide us with an example of the issue so we can debug it furhter?

Also, I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link

Please, let me know if you need any additional details. Have a nice day.

March 14, 2024 at 4:38 pm #15411557

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Yes, absolutely.

The WordPress dashboard credentials will suffice.

I've enabled the private fields for you.

If you could also please share what are the texts that you're looking into translating, that will help my investigation.

Thank you, please let us know.

March 15, 2024 at 5:48 pm #15415809

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Our team investigated the issue and I applied the following workaround in your site:

- Go the "Translate texts in admin screens" page and register/translate the title and description strings from the "admin_texts_woocommerce-ppcp-settings" textdomain

--- Now it can be translated in String Translation.

- Open the app/public/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/Settings/Settings.php file

- Look for the following snippet, around line 134:

foreach ( $defaults as $key => $value ) {
            if ( isset( $this->settings[ $key ] ) ) {
                continue;
            }
            $this->settings[ $key ] = $value;
        }

- replace with:

foreach ( $defaults as $key => $value ) {
            if ( isset( $this->settings[ $key ] ) ) {
                // WPML workaround for compsupp-7085
                $this->settings[$key] = apply_filters('wpml_translate_single_string', $this->settings[$key] , 'admin_texts_woocommerce-ppcp-settings', '[woocommerce-ppcp-settings]'.$key);
                continue;
            }
            $this->settings[ $key ] = $value;
        }

This workaround has already been applied to your site and now when I test it I'm able to see the payment description translated:

hidden link
hidden link

Please test it and let me know.
Thank you.
Mateus

March 18, 2024 at 9:07 am #15419710

kamenB-2

Hello Mateus,

I tested and works fine, thanks!
Can we expect this change to be added to the next WPML update?

Greetings

March 19, 2024 at 11:29 am #15425934

Mateus Getulio
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello there,

Thank you for confirming it fixed the issue.

Regarding your question, I checked it with our team and I'll let you know as soon as I have a confirmation.

Thank you,
Talk to you soon.