[Resolved] Woocommerce Gift Card received email is not translated
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue where the WooCommerce Gift Cards plugin sends notification emails in Greek regardless of the site language from which the gift card was purchased. Previously, a snippet was used to solve this, but it now causes a fatal error. Solution: We recommended updating the functions.php file with the following code:
We asked the client to verify if the last email is translated correctly by checking their WPML plugin log.
Please note that this solution might be outdated or not applicable to your specific case. If this solution does not resolve your issue, we highly 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 the problem persists, please open a new support ticket.
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.
We are facing an issue that we had solved in the past with the use of snippet that causes problems now. We have added the Woocommerce Gift Cards plugin whitch adds some new emails. The problem we are facing is that we have the default mail strings in Greek and have translated them, using string tranlation, in English. When someone buys a gift card from the Greek site the gift card receiver gets the notification in Greek, but when someone buys a gift card from the English site the gift card receiver gets notified in Greek again. We want the emails to be sended according to the site the gift card was bought from.
[Thu Jul 04 11:08:27.710899 2024] [proxy_fcgi:error] [pid 3721:tid 139887596521216] [client 2a02:85f:ec7f:f401:f44e:730d:cf86:543b:0] AH01071: Got error ’PHP message: PHP Fatal error: Uncaught Error: Call to undefined function wpml_st_load_admin_texts() in /home/997607.cloudwaysapps.com/tnzzdfsupc/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(582)
This is the older ticket we had oppened related to this issue. The problem is that it escalated to a ticket after chating with support, so we do not have the exact logs.
I have added the plugin, made an order but I did not receive any emails. Are the emails active in this site? I have also made the string translations as our site has, but i was not able to receive any emails. Please check it out.
I can see your order emails. You have to make a new order with a gift card and fill all the fields including the To field with a valid email address. After that mark the order as completed to receive the gift card email.
I was able to recreate the issue in the sandbox. You can see that I make an order for a gift card from the Greek and the English site, but both gift card received emails are in Greek. hidden link
You can just ask them why the snippet I have sended is causing problems and what can I use to replace it and fix the problem. I hope this will not take a month like last time.