This thread is resolved. Here is a description of the problem and solution.
Problem:
When using the Vikrentcar plugin with WPML on your site, the language automatically changes during the ordering process at step 3.
Solution:
To address this issue, you need to modify the code in the Vikrentcar plugin. Follow these steps:
1. Open the file at
wp-content/plugins/vikrentcar/libraries/adapter/application/route.php
.
2. Locate the function
JRoute::getPermalink()
around line 192.
3. Replace the existing code snippet within the function with the following code:
if ($post_id) {<br /> // WPML Workaround for compsupp-7493<br /> $post_id = apply_filters('wpml_object_id', $post_id, get_post_type($post_id), TRUE);<br /> $wpml_post_lang = apply_filters('wpml_post_language_details', null, $post_id);<br /> if ($wpml_post_lang) {<br /> // WPML supported, go ahead<br /> return apply_filters('wpml_permalink', get_permalink($post_id), $wpml_post_lang['language_code']);<br /> }<br /> // WPML not supported, fallback to the default behavior<br /> return get_permalink($post_id);<br />}Please note that this is a temporary workaround. We recommend contacting the Vikrentcar plugin developer for a permanent solution.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your case, please check the related known issues and confirm that you have installed the latest versions of themes and plugins. If the problem persists, we highly recommend opening a new support ticket with us for further assistance.
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.
This topic contains 3 replies, has 2 voices.
Last updated by 1 year, 7 months ago.
Assisted by: Christopher Amirian.