Problem: The client is developing a site and encountering an issue where the WooCommerce cart does not add more than 2 products. This problem occurs when the 'WooCommerce Multilingual & Multicurrency' plugin is active. Deactivating the plugin resolves the issue, suggesting a potential conflict. Solution: We recommended conducting a conflict test to pinpoint the source of the issue. This involves: 1. Deactivating all plugins except WPML, String Translation, WooCommerce, and WooCommerce Multilingual. 2. Switching to a default theme like 'Twenty Twenty-One' to check if the theme is causing the conflict. Since changing the theme was not an option for the client, we provided an alternative solution by offering access to our sandbox environment for further testing. This helps in isolating the issue in a controlled setting, free from server or external factors that might influence the behavior on the main site.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly 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. Should you need further assistance, please open a new support ticket at WPML support forum.
Problem: The client added text that was not appearing for translation in WPML. Solution: First, we recommend wrapping the string with the gettext function to make it translatable. For example, use the following code:
Next, follow these steps to ensure the string appears in WPML's String Translation: 1. Go to String Translation. 2. Enable the "Auto-register strings" option. 3. Visit the page on the front end where the string is displayed. 4. Disable the "Auto-register strings" option. 5. Search for the string to translate it. For detailed instructions, please visit our guide on finding strings that don't appear on the String Translation page.
If this solution does not resolve your issue or seems outdated, we highly 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 further assistance is needed, please open a new support ticket.
Problem: The client was experiencing an issue where the category links on the shop page were incorrectly set to random product URLs instead of the correct category links. This problem was observed in both the default and translated versions of the site. The client had already tried disabling WooCommerce, which did not resolve the issue. Solution: We recommended the client to disable WPML and its add-ons to verify if the issue still persisted on the default shop page. Upon further investigation, it was found that switching to a default theme like Twenty Twenty-One or Storefront resolved the issue, indicating a compatibility problem with the 'Windazo' theme. We advised the client to contact the theme's support team for a possible fix and suggested that the theme developers might consider joining the Go-Global program to ensure compatibility with WPML.
If this solution does not apply to your case, or if it seems outdated, we highly 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. Should the issue persist, please do not hesitate to open a new support ticket with us for further assistance.
Problem: The client needs to extract the URL of each custom taxonomy within a query on a specific page. The code was working correctly before installing WPML and still works if WPML is disabled. Solution: When working with WPML, it is necessary to use our hooks such as wpml_object_id and wpml_current_language. Here is an example:
$currentterm = get_field('selezione_categoria', false, true);
$term_id = $currentterm->term_id;
$taxonomy_name = 'product-category';
// Get current language
$current_language = apply_filters('wpml_current_language', NULL);
// Get term children
$termchildren = get_term_children($term_id, $taxonomy_name);
echo '<ul>';
foreach ($termchildren as a child) {
// Get the translated term ID
$translated_term_id = apply_filters('wpml_object_id', $child, $taxonomy_name, true, $current_language);
if ($translated_term_id) {
$term = get_term_by('id', $translated_term_id, $taxonomy_name);
echo '<li><a href="' . get_term_link($term->term_id, $taxonomy_name) . '">' . $term->name . '</a></li>';
}}
echo '</ul>';
Please note that this code is an example, and we cannot provide custom code.
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.
Problem:
I am trying to translate theme strings, but I can't register any. It doesn't matter if I try to do it with function like do_action( 'wpml_register_single_string', 'stegu', 'enter_search_terms', 'Enter search terms' ); or simply using __ . Also, options text fields page from ACF options page can't be translated (it works for acf fields in posts or pages). Link to a page where the issue can be seen: https://test.stegu.pl/
Solution:
For some reasons some of icl tables had positions with id 0. after removing them all works as a charm.
Problem: You are using pure SQL to duplicate variable products, but the newly created products/variations do not appear in the backend product list or in the product edit page under Product Data => Variations. Solution: If you're experiencing this issue, we recommend using the wpml_set_element_language_details hook to programmatically set the default language for your newly created products/variations. To batch add records into wp_icl_translations for these products, you will need to manage the related information in the icl_translations table. For more details on handling this table, please visit WPML Tables documentation.
Please note that this solution might be irrelevant if it's outdated or not applicable to your specific case. We highly 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 issue persists, please open a new support ticket.
Problem: The client wants to set a specific product with a different currency and have other currencies converted from this set currency on a multi-vendor platform using Dokan. The client also inquires if it's possible to set a different main currency for each vendor. Solution: We informed the client that currently, WooCommerce Multilingual or WooCommerce does not support setting a specific currency for a vendor, user, or country. However, a future version of WooCommerce Multilingual (5.5) will include a feature to set prices based on the country, but it is still in the early development stage. For now, a custom plugin might be necessary. We suggested checking out the WooCommerce Product Price Based on Countries plugin, although we have not tested this ourselves. For custom development, we recommended contacting certified developers through this link. Additionally, we provided a code snippet using the
wcml_raw_price_amount
hook to convert from the WooCommerce default currency price to another currency, and pointed to the function that auto-updates product prices in other currencies:
The update_exchange_rates function is defined in the *wp-content/plugins/woocommerce-multilingual/classes/multi-currency/class-wcml-exchange-rates.php* file (line 151).
If this solution does not apply to your case, or if it seems outdated, we highly 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 further assistance is needed, please open a new support ticket at WPML support forum.
If this solution does not apply to your case, or if it seems outdated, we highly 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 further assistance is needed, please open a new support ticket at our support forum.