 nikolaosM
|
They have not answered us yet. You have said that your team is contacting them to see if you can get an account to see where the strings are generated. How is it going?
|
 Osama Mersal
WPML Supporter since 02/2020
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+03:00)
|
Hi,
They haven't answered us yet, and our team is trying to figure this out on a copy of your staging site.
I'll update you as soon as I get any update from our team.
Best regards,
Osama
|
 Osama Mersal
WPML Supporter since 02/2020
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+03:00)
|
Hi,
We couldn't replicate the issue because of the account. However, we have a workaround that could be helpful. Please check the following steps:
1- Edit the "wp-content/plugins/klarna-payments-for-woocommerce/vendor/krokedil/klarna-onsite-messaging/src/Utility.php" file
2- Replace the following code
public static function get_locale_from_currency() {
$locale = get_locale();
$currency = get_woocommerce_currency();
$country_code = self::get_purchase_country();
With
public static function get_locale_from_currency() {
$locale = get_locale();
$currency = get_woocommerce_currency();
$country_code = self::get_purchase_country();
if ($is_wpml_configured = apply_filters( 'wpml_setting', false, 'setup_complete' ) == 1) {
return $locale;
}
❌ Please backup your site before performing the above steps ❌
Best regards,
Osama
|
 nikolaosM
|
Hello Osama,
I have tried what you suggested in our demo site and the message goes missing from the product page.
Before: hidden link
After: hidden link
Thanks!
|
 Osama Mersal
WPML Supporter since 02/2020
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+03:00)
|
Hi,
Would it be possible for our 2nd tier support team to check the issue on your demo site?
If yes, please add the access details to the private fields.
Best regards,
Osama
|
 Osama Mersal
WPML Supporter since 02/2020
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+03:00)
|
Hi,
Thanks for the details. Our 2nd tier team will check the issue on your site and I'll update you with their findings.
Best regards,
Osama
|
 Osama Mersal
WPML Supporter since 02/2020
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+03:00)
|
Hi,
Please check if the message is translated correctly.
Best regards,
Osama
|
 nikolaosM
|
Yes we can see the string translated. If you are asking about the translation, it is not correct, after the euro symbol you sould add this string inside the brakets ", via debit or credit card".
|
 Osama Mersal
WPML Supporter since 02/2020
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+03:00)
|
Hi,
We didn't translate the message. The message is retrieved from the Klarna server, so you would need to contact them to change the message.
Best regards,
Osama
|
 nikolaosM
|
So what you did was contact Klarna and issue is solved?
|
 Osama Mersal
WPML Supporter since 02/2020
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+03:00)
|
Hi,
We changed the code so the Kalrna server sends the message according to the language local.
Best regards,
Osama
|
 nikolaosM
|
Hello,
Sorry but we are geting confused. Can you explain the things you did so we can make this work? Do we have to change anything in the live site?
Thanks!
|
 Osama Mersal
WPML Supporter since 02/2020
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+03:00)
|
Hi,
Please replace the previous workaround code with the following code. (https://wpml.org/forums/topic/cant-find-strings-for-klarna-payments-plugin/page/2/#post-15731643)
public static function get_locale_from_currency() {
$locale = get_locale();
$currency = get_woocommerce_currency();
$country_code = self::get_purchase_country();
if ($is_wpml_configured = apply_filters( 'wpml_setting', false, 'setup_complete' ) == 1) {
if ($locale == "en_US") {
$locale = "en-GR";
return $locale;
}
}
Best regards,
Osama
|
 nikolaosM
|
Hello Osama,
Thanks fot the help. It fixed the issue in the product page, but the problem the problem still remains in the checkout page. We would like a solution for this also.
|
 Osama Mersal
WPML Supporter since 02/2020
Languages:
English (English )
Arabic (العربية )
Timezone:
Africa/Cairo (GMT+03:00)
|
Hi,
Please contact the plugin author for more help regarding translating the checkout message.
Also, please check this guide. (hidden link)
Best regards,
Osama
|