I am trying to: sell downloadable products in two languages.
Link to a page where the issue can be seen: we have currently implemented a temporary fix.
I expected to see: download links on the Thank You page and in customer emails after purchasing a downloadable product.
Instead, I got: no links on the Thank You page or in customer emails. They are however visible on the My Account page, and on the WooCommerce order itself.
Additional information:
I read another thread about what seems to be the same issue (post #9097641). That thread was closed because you were unable to consistently replicate it. We have therefore been trying to replicate and debug the issue ourselves, and we have found what seems to be the cause, at least in our case.
In the filter_downloadable_product_items() function of the WooCommerce Multilingual plugin, the following line of code is executed:
By printing the order language of orders with missing links, we found that the $order_language variable was set to "en" (English). The default language of the site is "no" (Norwegian), and as such, the original products are added in Norwegian, and the download permissions are granted to the Norwegian product ID, regardless of the value of $order_language. See uploads for images with $order_language = "no" and $order_language = "en".
When the $order_language is set to "no", the $translated_product_id of the previously pasted code becomes the product ID of the Norwegian product, and the links are displayed. However, when $order_language is set to "en", the $translated_product_id remain the English one, and no links are displayed. This is because the download permissions are given to the Norwegian product, as mentioned earlier, so the query to check for permissions will return empty when looking up the English product IDs.
We are having issues with this on a daily basis, so what we've done to temporarily fix it is to hardcode filter_downloadable_product_items() to always use "no" instead of $order_language:
Welcome to the WPML support forum. I will do my best to help you to resolve the issue. Sorry for the delay happened because of the weekend. It is not normal here.
I have a couple of requests for tracking this bug. Please share the following details.
a) Please create a staging site(clone copy of live site) for our testing. So we can troubleshoot the issue without affecting the live site. I am enabling the private option for the next reply. Please refer to the following links for more details about our private information sharing policies.
We are still working on this issue. But unable to reproduce the issue exactly with the products having the issue on the staging site & my local copy. We have tried with WPML 4.5.2 & WooCommerce Multilingual 4.12.3(the latest version). Please check the attached images.
Therefore one request. Please check the bug is reproducible in the staging site now.
As mentioned, we're not sure exactly how to reproduce it, and we were hoping now that we've laid down the ground work, you would be better able to find this out. We have updated to the latest versions of WPML and WCML on the livesite, and asked the client to let us know if the error still occurs after the fact.
By the way, in case the issue persists, you can use this test card in Klarna Checkout, which will make the order go through automatically:
Credit card number: 4111 1111 1111 1111
CVV: 123
Exp: 12/25 (Or any other valid date in the future)
As it seems the orders you've placed so far are given the status "On hold", using this card would simulate the real orders more accurately.
Thank you for the updates. I was able to reproduce with the following order after making a few orders. So consulting with our team for the expert opinion. We will get back to you soon. Please wait.
Sorry for the late response due to the holidays. The bug is escalated to our developers for fixing. We will get back to you soon when we have an update from our developers on this. Please wait.
Our developers are still working on this fix. We will contact you soon when we have feedback from our developers on this. Please wait. Thank you for your patience.
Any updates on this?
We have the exact same problem here. On a 2 language install (English/German) the German users sometimes (!) don't get the download links in the emails. This problem exists since months and should really be fixed. I think morten has given enough information.
Please share the status of this bug.
Sorry for the delayed response. I'd like to follow up on this issue: please update your WPML plugins to the latest versions if they haven't already been updated.
Let me know if you’re still having the problem after that.