Problem: You are using WPML's multi-currency feature on your WooCommerce site and want the final total amount sent to your payment gateway to remain in your primary currency, 'New Taiwan Dollar (TWD)', rather than the converted amount. However, at checkout, the system only sends 10 TWD instead of the correct total amount in TWD. Solution: Unfortunately, maintaining the checkout total in TWD using WPML's multi-currency feature directly is not possible without additional customization. You will need to implement some custom code similar to how currency conversion is handled in WooCommerce at checkout without WPML. If you require assistance with the custom code, we recommend consulting with WPML Contractors.
Please note that this solution might be 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.
Problème : Vous travaillez sur un site en développement et utilisez l'API Rest de WordPress pour la création et la mise à jour de posts. Vous souhaitez connaître la langue d'un post via l'API Rest et créer un post pour l'associer en tant que traduction d'un autre post. Solution : Pour récupérer la langue d'un post, utilisez ce hook : https://wpml.org/fr/faq/how-to-get-current-language-with-wpml/ Si vous utilisez WooCommerce avec l'API REST, consultez cette documentation : https://wpml.org/documentation/related-projects/woocommerce-multilingual/using-wordpress-rest-api-woocommerce-multilingual/ Pour lier des traductions de posts ou de pages via l'API Rest, une solution personnalisée est nécessaire. Un utilisateur de WPML a partagé un code qui a bien fonctionné pour d'autres utilisateurs, mais gardez à l'esprit que ce n'est pas une fonctionnalité intégrée à WPML et que nous ne pouvons pas offrir de support pour ce code. Voici le code :
Le processus consiste à créer le premier post dans une langue, créer le second post dans une autre langue, puis les lier via un endpoint personnalisé.
Si cette solution ne vous convient pas ou semble obsolète, ou si elle ne correspond pas à votre cas, nous vous recommandons de vérifier les problèmes connus sur https://wpml.org/known-issues/, de vérifier la version du correctif permanent et de confirmer que vous avez installé les dernières versions des thèmes et plugins. Si nécessaire, n'hésitez pas à ouvrir un nouveau ticket de support sur le forum de support WPML.
Problem: The client is experiencing issues with the MegaMenu on a multilingual WordPress site using WPML. In the German version, the Products menu item shows categories but no products, and clicking on a category leads to an incorrect URL. Solution: 1. We reviewed the MegaMenu code and found that the product categories were added but were pointing to the wrong URLs. We updated the code to be language-aware by adding a WPML language parameter and setting the language before querying products. 2. We also checked the slug translation issue and found that WordPress does not allow duplicate slugs across languages, which is not controlled by WPML. 3. We recommended setting up a staging site and activating a default WordPress theme to confirm if the issue is caused by the custom menu walker in the theme. If the problem persists, it may require custom development.
Please note that this solution might be 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. If the issue persists, please open a new support ticket at WPML support forum.
Problem: The client was experiencing multiple critical issues with Custom Post Type (CPT) translations and permalink generation in WPML across different language subdomains. The specific problems included permalinks only working in the language they were last saved, incorrect redirects for CPT archive pages, an error message when editing CPT posts in Russian, and domain mapping issues with the Russian subdomain.
Solution: We identified that the client was incorrectly setting the slug for their CPTs, which affected the translatability of archive slugs. We recommended setting the rewrite array correctly in the
register_post_type()
function, specifically ensuring that the 'slug' key is correctly defined to make the archive slug translatable. For example:
rewrite' => array('slug' => 'book'),
This adjustment allows the slug to be translated according to WPML's standard procedures. We also suggested checking our documentation on translating slugs for custom post type archives for further guidance: Translating Slugs for Custom Post Type Archives
If this solution does not fully resolve the issues or seems outdated, we recommend opening a new support ticket. Additionally, we highly advise 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.
Problem: The client's developer noticed that the site's code is filled with direct references to specific languages, which is not scalable for adding multiple languages. Solution: We recommend using WPML hooks to manage language dynamically. Specifically, you can use
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 you need further assistance, please do not hesitate to open a new support ticket or visit our support forum.
Problem: The client is facing an issue where changing the status of a product to 'Draft' in the Dutch version does not automatically change the status in other language translations. The client desires that when the primary language product is set to 'Draft', all translated versions should automatically reflect this status. Solution: We explained that by default, WPML does not synchronize the post statuses across translations as per user feedback. However, to achieve the desired behavior, the client can add a custom code snippet. This code should be added to the functions.php file of a child theme or a Code Snippet Plugin. The code ensures that when the status of a product is changed in the primary language, it automatically updates the status in all other translations to match. Here is the code snippet.
If this solution does not apply or is outdated, we recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.
Problem: The client needs to ensure that image meta fields are automatically translated in such a way that the image remains the same across all languages, both when using automatic translation and when manually translating posts or taxonomies. Solution: 1. To ensure images are available in all languages when using automatic translation, navigate to WPML > Settings > Media translation. Verify that the images exist in all languages by checking in Media > All and switching between languages. This setting uses the same file but ensures the image exists in the database for all languages. 2. For manual translations where you want the image to be set automatically, go to WPML > Settings > Custom fields, find your custom field, and set it to COPY. This will copy the same image IDs to your translated posts.
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 issues persist, please open a new support ticket at WPML support forum.
Problem: You are developing a site and want to redirect users for missing translations to a specific URL for each language instead of the homepage. The code you tried is not working. Solution: By default, WPML redirects missing translations to the homepage only. For redirecting to custom URLs per language, you might consider third-party services such as Permalink Manager Lite or Redirection. If you require further customization, we recommend using our Contractors service, which is a paid option. You can find more information here: WPML Contractors.
Please note that this solution might be irrelevant if it's 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. If the issue persists, please open a new support ticket for further assistance.
Problem: If you're experiencing issues where WPML automatically adds language subfolders (e.g., /nl/) to Lasso cloaked links on your multilingual WordPress site, causing the links to break on translated pages, we can help. Solution: We recommend adding a specific filter to your theme’s functions.php file to exclude certain links from being automatically translated by WPML. Here’s how you can do it:
Replace 'your-slug-here' with the slug of the page in the original language that you want to link to without translation interference. For example, if you want to link to an English page with the slug 'premium-dip-belt-calisthenics-equipment-by-gornation', you would add this slug to the $blacklist array.
If this solution does not fully resolve your issue or seems outdated, or if your case requires a more tailored approach, 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 do not hesitate to open a new support ticket with us at WPML support forum.
Problem: You are using Make.com to automate translations via the WordPress REST API and GPT API for custom localization, but the translated articles are not linking to their original English posts in WPML. The translations object is empty, and manual updates using the WPML API do not establish the connection. Solution: Currently, WPML does not fully support creating and linking translations directly through the REST API. You can specify the language using the '?lang=' parameter when creating a post, but additional steps are required to link translations. A custom solution involves: 1. Creating the first post in one language using a standard API POST call. 2. Creating the second post in another language using another API POST call. 3. Linking both posts using a custom endpoint. Here is a code example provided by another user that might help: https://gist.github.com/djoo/5518bcf4ccef93ab83d91787c41e929a Additionally, you can utilize WPML hooks for more functionalities:
Always ensure to have a backup when implementing 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 further assistance is needed, please open a new support ticket at WPML support forum.
Problem: You are trying to display the language switcher in the header on desktop devices, but it has disappeared. Solution: We have identified that a custom class and CSS are hiding the language switcher. We recommend disabling this in the browser inspector to see if the language switcher becomes visible. You should re-evaluate your custom CSS to resolve the issue permanently.
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.