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.
Tagged: Compatibility
This topic contains 10 replies, has 2 voices.
Last updated by Mohamed Sayed 1 year, 1 month ago.
Assisted by: Mohamed Sayed.
Author | Posts |
---|---|
March 11, 2024 at 9:03 am #15393698 | |
vokos-monoprosopi-saV |
Hi there hidden link after the price the text have to be "pcs wit VAT" and not "sqm with VAT" as it is now. i am using this text "sqm with VAT" after the price and is correct there hidden link |
March 11, 2024 at 10:35 am #15394204 | |
Mohamed Sayed |
Hi, Please try this: 1- Go to WPML String Translation If that didn't help, please try the following steps: 1- Go to WPML-> Theme and plugins localization Kindly check our guide to know more about translating texts in the admin texts screen. (https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/) Kind regards, |
March 13, 2024 at 1:57 pm #15404327 | |
vokos-monoprosopi-saV |
Hi but in the secont image that i am attaching in the WPLM/String translation only the one string i can find that "in the second case" and i can not find the "first case" to translate it. and yet, although I cannot translate it, I see that in the product here hidden link next to the price it has got the translation "sqm with VAT" which should not have had this translation but should have had the translation "pcs. with VAT" |
March 13, 2024 at 6:37 pm #15405807 | |
Mohamed Sayed |
I would need to request temporary access (WP-Admin) to investigate the issue further. Your answer will be private, meaning only you and I can access it. ❌ Please backup your database and website first❌ If you don't see the form below, please don't add your credentials as they will be publicly exposed: Privacy and Security when Providing Debug Information for Support: |
March 14, 2024 at 11:53 am #15409558 | |
Mohamed Sayed |
I couldn't find any clues so I'm consulting our 2nd tier supporters about this issue. I will update you once I get their reply. Kind regards. |
March 15, 2024 at 12:55 am #15412576 | |
Mohamed Sayed |
I got the reply from our 2nd tier supporters, this could be a compatibility issue. I have created this clean sandbox setup on our servers here: May I kindly ask you to install the "ELEX Product Price Custom Text" plugin and try to recreate the issue? (WPML and WooCommerce are already installed and configured) Please don't install anything else like plugins that are not necessary, on a clean sandbox we try to use just the WPML plugins and the plugin/theme that's part of the issue. If the issue is going to take place on this clean setup on our servers too, then I can forward this to our compatibility department. Please let me know how that goes and what you can find. |
March 15, 2024 at 8:49 am #15413207 | |
vokos-monoprosopi-saV |
Hi The original language is the English, and from this language we will translate into German and Danish in my example I have passed in the English language 2 products 1. hidden link in German in Danish the first language is English, and they should be translated into the other languages: 1. in the first case: "τμχ. με ΦΠΑ" this should be translated as "pcs. with VAT" thank you |
March 17, 2024 at 11:38 pm #15418966 | |
Mohamed Sayed |
Sorry for the late reply due to the weekend. I escalated this issue to the compatibility team and will let you know once I get any updates. Kind regards, |
March 20, 2024 at 10:31 am #15430400 | |
Mohamed Sayed |
Thanks for your patience! The string is stored as the elex_ppct_custom_fields_suffix custom field inside the product. The expected workflow would be to translate that string with the product. However, the author does not register this field as translatable. Instead, they register and translate that string with a string translator in SettingsController::elex_ppct_return_wpml_string() - ....../wp-content/plugins/elex-product-price-custom-text-before-after-text-and-discount-for-woocommerce/includes/SettingsController.php This would work correctly if the text is the same on all products, but when you try to define different texts for products, it conflicts. Workaround: <wpml-config> <custom-fields> <custom-field action="copy">elex_ppct_custom_fields_checkbox</custom-field> <custom-field action="copy">elex_ppct_custom_fields_suffix_checkbox</custom-field> <custom-field action="copy">elex_ppct_custom_fields_discount_type_checkbox</custom-field> <custom-field action="copy">elex_ppct_custom_fields_prefix</custom-field> <custom-field action="copy">elex_ppct_custom_fields_prefix_checkbox</custom-field> <custom-field action="copy">elex_ppct_discount_amount</custom-field> <custom-field action="copy">elex_ppct_discount_type</custom-field> <custom-field action="translate">elex_ppct_custom_fields_suffix</custom-field> <custom-field action="translate">elex_ppct_custom_fields_prefix</custom-field> </custom-fields> </wpml-config> 2. Open the ....../wp-content/plugins/elex-product-price-custom-text-before-after-text-and-discount-for-woocommerce/includes/SettingsController.php file. 3. Around line 121, replace the following snippet: public static function elex_ppct_return_wpml_string( $string_to_translate, $name ) { // https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/#hook-620585 // https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/#hook-620618 With: public static function elex_ppct_return_wpml_string( $string_to_translate, $name ) { // WPML Workaround for compsupp-7267 // We want to disable the rest of the code so it can be translated via custom field translation (instead of String Translator) return $string_to_translate; // https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/#hook-620585 // https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/#hook-620618 4. Do a small modification on the original product and save it I tested this on the sandbox site and it works as you can see here: As this plugin is not listed as compatible https://wpml.org/plugin/, could you please report this issue to the plugin authors? Kind regards, |
March 20, 2024 at 12:23 pm #15431249 | |
vokos-monoprosopi-saV |
this from what i see has solved the problem. Thank you very much. I have contact with the ELEXtensions and I mentioned issue to them thank you very much for your great help |
March 20, 2024 at 12:41 pm #15431446 | |
Mohamed Sayed |
I'm glad to hear that the issue is resolved. Please feel free to contact us again if you have any further questions or issues, we will be always happy to help. |