Home›Support›English Support›[Resolved] My WPML translated images are not showing correctly in Quick View on the .com domain
[Resolved] My WPML translated images are not showing correctly in Quick View on the .com domain
This thread is resolved. Here is a description of the problem and solution.
Problem: If you're experiencing issues where the translated images of your products are not displayed in the Quick View popups from WPC Smart Quick View for WooCommerce, despite showing correctly on product pages after translating them with Media Translation, this summary might help. The issue manifests as images still appearing in Dutch when using the Quick View option. Solution: We recommend checking if the product ID is correctly translated in the quick view, as it should display different IDs for different language versions. If the thumbnails are using the incorrect language ID, you might need to integrate the wpml_object_id hook into your theme or plugin. DISCLAIMER: Please note that making changes directly in the plugin's code if not recommended, every time the plugin gets updated you will need to reapply this modification. That's why it's recommended to report this issue to the plugin's author for a permanent fix like the client did. You should always test custom code on a staging copy of your site or have a recent backup that you can restore. That being said:
-Edit the file located at /plugins/woo-smart-quick-view/wpc-smart-quick-view.php
and add this code at line 319:
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 with us.
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.
<b>Background of the issue: </b>
I am trying to ensure that the images for the English versions of my products on the .com domain display correctly in the Quick View popups. The product pages show the correct English images after updating with WPML's Media Translation.
See problem here: hidden link
<b>Symptoms: </b>
When customers use the Quick View option, the images are still in Dutch. The issue happens inconsistently—sometimes it works fine after I update a product, and at other times, the images revert to Dutch without any apparent changes or edits to the product.
<b>Questions: </b>
How can I ensure that the translated images display correctly in Quick View popups?
Is there a way to prevent images from reverting to Dutch in Quick View?
Could caching or an automatic override by WPML be causing this issue?
Sorry for the late reply but every time you post a new answer, you're pushing your ticket back to the end of the queue 🙁
1. Important: You've published the temporary access link on our public forum. For security reasons please delete that access immediately. I will activate a private field for your next answer where you can provide that information safely (this field is only visible by you and the support team).
2. I've also enabled a private message for submitting the debug information for this support ticket as it will help me understand your configuration.
- Go to "WPML > Support > Debug Information" (link)
- Copy the Debug Information from there.
- Find the private field I activated and paste that information.
3. Now regarding the issue itself, I'm not sure that the answer given by WPClever is a good solution:
- It's not recommended to edit the English translation directly in the WordPress editor. You should always use our Advanced Translation Editor (ATE).
- If you don't want to duplicate images, you need to uncheck those options from the original, BUT it's not the answer here as unchecking those options, will leave your translation without image. The right way to translate an image is to duplicate the images and then, using "WPML Media Translation", replace the original image by the English image for your English translation.
Thank you for providing access. I’ve reviewed the source code, and it seems that the product ID is correctly translated in the quick view.
For example, when the "Groomzo Luxury 15-Piece Grooming Set" appears under "Frequently bought together," the ID is 989810 in Dutch (NL) and 1003106 in English (EN), which is correct.
However, the thumbnails are using the NL ID in both languages (for instance, hidden link" rel="noopener" target="_blank">1001279).
Please note that I am not a developer, so I would highly recommend reaching out again to WPClever support to report this issue. They should correct it in a future release (as they claim to be compatible).
That said, I believe the issue could be resolved by using our hook wpml_object_id in the wpc-smart-quick-view.php file, around line 318.
Could you provide access to a staging copy of your site (Admin account + FTP access) so I can test this without affecting the live site?
If a staging site is not an option, let me know and I will create a sandbox site on our servers where you can install the plugin and reproduce the issue.
I was unable to connect to your server via FTP, so I went ahead and made the changes directly on your production site.
For your reference, here’s what I did:
-I edited the file located at /plugins/woo-smart-quick-view/wpc-smart-quick-view.php
I added this code at line 319:
1. Could you please confirm if this resolves the issue?
2. Keep in mind that whenever the plugin is updated, you’ll need to reapply this change. That’s why I recommend reporting this to their support team.
Thanks for your quick work! For now it seems to be working indeed. I hope it will not be overruled in the coming days, like the last few times I updated the products.
I will watch if a few days and will let you know. I also forwarded your message to the WPclever support team, Ill also let you know if they reply.
There is a new comment on the support ticket in the WPC Smart Quick View category from Dustin H.. Here's what they said:
Hi Mark,
Thanks for that news! I'm glad it worked for you.
I'll implement this code to our plugin and release an official updated version soon.