[Resolved] Can't find strings for Klarna Payments plugin
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is using the Klarna Payments for WooCommerce plugin and is unable to find the plugin's strings translated into Greek in the string translation to translate them into English, despite scanning the plugin and theme and using various translation options. Solution: We recommend modifying the plugin's code to ensure WPML correctly identifies and translates the strings. Follow these steps: 1. Edit the file at
Please ensure to back up your site before implementing these changes.
If this solution does not resolve your issue or seems outdated, we recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket at WPML support forum.
0% of people find this useful.
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.
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?
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 ❌
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".
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.