This thread is resolved. Here is a description of the problem and solution.
Problem:
The client was experiencing an issue where after translating a layout page to 100% using WPML, the gear icon remained, indicating that the translation was not marked as completed.
Solution:
Initially, we suggested making a minor edit in the default language and updating it, followed by clearing the WPML cache and synchronizing jobs and translators via WPML->Support->Troubleshooting. When this did not resolve the issue, we requested temporary access to further investigate. Upon reviewing the ATE error logs, we identified a conflict with the Woodmart theme specifically related to translating product layouts. We directed the client to contact Woodmart support with the specific error for resolution. Meanwhile, the Woodmart support team suggested adding the following code to the
functions.php
file in the client's child theme:
add_action( 'woocommerce_before_template_part', function () {<br /> global $product;<br /> if ( wp_is_json_request() && ! $product ) {<br /> $random_product = new WP_Query(<br /> array(<br /> 'posts_per_page' => '1',<br /> 'post_type' => 'product',<br /> )<br /> );<br /><br /> while ( $random_product->have_posts() ) {<br /> $random_product->the_post();<br /> $product_id = get_the_ID();<br /> }<br /><br /> wp_reset_postdata();<br /><br /> $product = wc_get_product( $product_id);<br /> }<br />});
After implementing this code and clearing the cache, the issue was resolved.
Please note that this solution might be outdated or not applicable to your specific case. If the problem persists, 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 needed, do not hesitate to open a new support ticket at WPML support forum.
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 7 replies, has 2 voices.
Last updated by 1 month, 1 week ago.
Assisted by: Bobby.