Waiting for author
Reported for: WooCommerce Multilingual & Multicurrency 5.3.5
Overview of the issue
If you are using the WooCommerce PayPal Payments plugin, you will encounter that the “Pay via PayPal” button text is not being translated as expected in the front-end.
Workaround
Please, make sure of having a full backup of your site before proceeding.
Option 1 (Recommended)
Create a MU plugin as recommended in their Github repository.
Option 2
- Go the Translate texts in admin screens page and register the title and description strings under the
admin_texts_woocommerce-ppcp-settings
textdomain. - Open the app/public/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/Settings/Settings.php file.
- Look for line 134.
- Replace:
foreach ( $defaults as $key => $value ) { if ( isset( $this->settings[ $key ] ) ) { continue; } $this->settings[ $key ] = $value; }
- 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; }
Hello,
I was able to translate the labels in the credit card fields, but the input box do not show in my translated language. Any idea how to fi this?
Thanks.
Hello Alexanne,
I’m afraid this is a different issue from the one reported here. If you can’t find the related string in WPML > String Translation, please open a chat in our assistance channel.
We will be able to help you better there.