Skip Navigation

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.

Our next available supporter will start replying to tickets in about 3.96 hours from now. Thank you for your understanding.

This topic contains 21 replies, has 2 voices.

Last updated by Marcos Vinicios Barreto 3 weeks, 1 day ago.

Assigned support staff: Marcos Vinicios Barreto.

Author Posts
March 18, 2021 at 12:17 pm #8341821

tessH-2

Hello, I have a multilanguage website with WPML, but "Your account on packara is approved!" email is not translated. I translated this by loco translate and WPML, do you have any idea what is wrong? see attachment

The website is packara.com

I need this email in german and dutch and english.

I asked Woocommerce b2b plugin for this and this is what they say:

Hi ebus-DT-1984, how are you? I hope so! WooCommerce B2B make use of default WordPress / WooCommerce standards and best practice about internationalization, it's very strange. From a first check, it seems that WPML is detecting the translated string only in the plain version of the email (see attachment). I suggest contacting WPML support to check why it doesn't detect the HTML version, which still uses the default WordPress gettext functions. I hope this information will help resolve your doubts Best regards

5678-605231cf3f219.png
March 19, 2021 at 2:05 am #8347425

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for contacting our support service. Is this message defined in the mentioned plugin (WooCommerce B2B)? If sou, you can try these directions:

1 - From your WordPress Dashboard > WPML > Theme and plugins localization settings, select the mentioned plugin and scan its strings.

2 - If they are defined in the plugin source files you should see them available to be translated from your WordPress Dashboard > WPML > String Translation settings. The resources below will help you to find these strings in case they are defined in plugin source files or plugin options:

https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/

https://wpml.org/documentation/getting-started-guide/string-translation/

Please, let me know if it helps, have a nice day.

March 19, 2021 at 12:28 pm #8351513

tessH-2

Hi Marcos, I found all the strings. Translated them all. Double checked it with your tips. And still the follow up email is not translating in the right language. So a client is registering, than they get an "new account" email that we are reviewing their account. After we accept that client, there is a follow up email "status notification". I translate that exactly the same way. Its all translated. And this email is a combination between Dutch and English while it needs to be german in this case. Because the profile that we are testing is german. I really hope you can help me because this website is already online. Thanks

In the screenshots you see the German email. Its part english part dutch. And in the other screenshot you see the source in wpml. In the other screenshot you see the translated strings.

Screenshot 2021-03-19 at 13.46.06.png
Screenshot 2021-03-19 at 13.43.51.png
Screenshot 2021-03-19 at 13.44.07.png
March 22, 2021 at 11:25 am #8367255

tessH-2

Hi, Im still waiting for a reply.
But in the meantime another problem also seems to be a WPML error. When you look at hidden link you can see that the variations (size) are there.

In the German version of the website this variations in a few products are not showing anymore. hidden link

As you can see, the size DOES shows for a second and is then gone. We tried everything on all your forums and external website forums. I worked this whole weekend on this two issues with this website VS wpml. I am done. There is not a solution for eather one of this problems that is a standard issue. Its bigger and it needs to be fixed. Sorry but I need more help than the basic support. The problem is deeper. I have a login for you so that you can check the website for yourself on the backend and we dont keep going up and down with days in between because im losing my client over this.

So in short.
Issue 1: customer-status-notification is not translated in German in woocommerce b2b/emails because of WPML problems
Issue 2: Variations on German website not showing anymore.

Please please please reply as im losing my client!

March 22, 2021 at 5:56 pm #8370793

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Please, take a look at my previous private reply and let me know when the migration process is done. Thanks.

March 22, 2021 at 6:25 pm #8370903

tessH-2

Hi, thanks for helping me. I keep getting a error. Can u see what i do wrong?

Screenshot 2021-03-22 at 19.24.42.png
March 23, 2021 at 10:39 am #8376791

tessH-2

Because of the time difference and the urgency of this case thats already taking 4 days bc of this timedifference. I have made a login for you on the website. Please can u help me in a way that i dont have to wait 24 hours for a reply because shit is hitting the van here with my client.

[REMOVED]

Please can u log in and do what you want to fix it? Please im begging at this moment.

March 23, 2021 at 7:30 pm #8383527

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for the provided details and we really sorry for the waiting here due the weekend. I managed to migrate your website to our test servers, so, we can investigate it without interfering in your website.

I reviewed your website settings into details and I think I found the root cause of your issue, here are the details:

1 - At your WordPress Dashboard > WooCommerce > Settings > Emails > Status notification I see you have entered the email content in English while your website has Dutch as default language

2 - When you go to WordPress Dashboard > WPML > String Translation and click the Translate texts in admin screens option you will notice these strings appear in Dutch, it might lead to confusion when WPML decides which content to send (see attached screenshot customer_02).

3 - In order to fix it, please enter the content for the notification emails in your WordPress Dashboard > WooCommerce > Settings > Emails > Status notification settings in Dutch, then search for 'admin_texts_woocommerce_wcb2b_customer_status_notification_settings' option and register them to be translated with String Translation.

Read these details at: https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/#strings-arent-selected-for-translation

4 - Back at your WordPress Dashboard > WPML > String Translation settings, click to select the option you registered to be translated with WPML String Translation (admin_texts_woocommerce_wcb2b_customer_status_notification_settings) change the default language of its content to Dutch and translate it to the other languages.

Read these details at: https://wpml.org/documentation/getting-started-guide/string-translation/how-to-change-the-source-language-of-strings/

Please, let me know if helps to fix your issue, have a nice day.

customer_02.png
March 24, 2021 at 11:41 am #8388981

tessH-2

Hi,

I dont see how you say that the emails are in english. They were all in Dutch, the default language. I checked all your steps but everything was already exactly like that. I did what you say but the problem is still the same. New account is good. Status notification is still 100% in dutch. Can u login again and check it again?

March 25, 2021 at 12:46 am #8394587

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for the updates. It indeded seem to be a compatibility issue, I proceeded with several tests in your website, I created a demo user and tested the status notification email setting different languages for the user profile, nothing worked so far, all the emails are always sent in the default language (Dutch), I also noticed the plugin WooCommerce B2B is not listed in our list of compatible plugins at: https://wpml.org/plugin/ in these cases, these are the procedures:

  • Install the theme/plugin in a clean installation and reproduce the problem in this new installation. So we can isolate it and do some testing without the interference of server settings or other plugins
  • After this, I will check the problem in this new installation and look for a quick solution
    If I can not find a solution, I will forward the problem to our compatibility team.
  • The compatibility team will do some more testing and will contact the product author to fix the issue

I created a test website with a clean WordPress install. You can access it through this link:
hidden link - Through this link you will be automatically logged in.

Please upload the (theme/plugin) to this test install, setup it the same way as in your website (using the same options) and create some dummy content to reproduce the issue. Please note that we only need the (theme/plugin) and the related functionality, you don't need to setup a entire website or clone your existing site. The fewer plugins the better.

After that, please send us clear steps on how to see/reproduce the issue on this test install. We will run some tests.

Please, let me know when you are ready, thank you for your collaboration, have a nice day.

March 25, 2021 at 1:22 pm #8400123

tessH-2

Hi,

I understand what u want me to do. The problem is that i hired a professional to make the product import, woocommerce b2b and the shop side. I dont know how i can make this website and he ask me 80 euro an hour to do it so this is not an option. In no way.. Because i really dont know how to recreate it. Sorry.

Is it an idea that you do this test on the copied website we already made?

And can u also look at the other issue with the variable products? its also a problem with woocommerce b2b VS WPML. So, maybe the compatibility team can check that as well as we are already a week talking and not one step further.. Issue nr #8367255

Thanks

March 25, 2021 at 11:52 pm #8404081

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for the updates. We really need to replicate this issue in a clean test sandbox install, it is required procedures in order to involve our compatibility team. Creating the minimal content needed for the issue replication in a clean test install will help us to isolate the issue and make sure no server settings, third party plugins or theme code is interfering in the process. Also, you don't need to create an entirely copy of your website, that's not the purpose, instead you just need the following:

1 - Run the WPML setup and configure a primary language and secondary language as you did in your website.

2 - Enabled WooCommerce and WooCommerce Multilingual plugins.

3 - Upload, install and setup the WooCommerce B2B plugin the same way you did in your website and make sure the status notification email content is translated.

4 - Create a demo user inside the WordPress Dashboard and activate/deactivate it so the status notification email can be triggered.

All these steps will confirm if we have indeed a compatibility issue and this way search for alternative or fix for that.

As regarding your other issues, we are not able to proceed before fixing this one, our support policies require we proceed with one issue at a time, it will make our support efforts easier to manage. You can also create a separated ticket for this issue, so, another support agent can work in parallel and this way you don't become stuck waiting for one issue to be solved, before being able to handle the other one.

Thank you for your understanding, have a nice day.

March 26, 2021 at 3:27 pm #8409161

tessH-2

I did what u wanted. Please check it out. Btw you still have your login for the original website so if u need something or u need to check it you can just login and check it.

Tnx

March 29, 2021 at 6:41 pm #8424953

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for the updates. This issue is now escalated to our compatibility team, I will let you know as soon as I have some more details regarding a possible issue resolution or workaround. Thank you for your patience and understanding, have a nice day.

April 6, 2021 at 1:03 am #8469281

Marcos Vinicios Barreto
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Bahia (GMT-03:00)

Hello,

Thank you for your patience while waited a reply. We found a workaround for this issue, we tested it and it works. However, this is a temporary solution and your plugin author should be contacted regarding a permanent fix, here it is:

IMPORTANT: Please, note, a backup is required for security reasons and to avoid any data loss, you can use the https://wordpress.org/plugins/backupwordpress/ plugin for these backup needs.

1 - At wp-content/plugins/woocommerce-b2b/includes/classes/emails/class-wcb2b-email-customer-status-notification.php find the lines 77 to 85 where it reads:

 if ( wcb2b_has_role( $user_id, 'customer' ) ) {
            if ( $this->is_enabled() && $this->get_recipient() ) {
                $this->user_id = $user_id;
                
                $this->setup_locale();
                $this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
                $this->restore_locale();
            }
        }

Replace it with:

 if ( wcb2b_has_role( $user_id, 'customer' ) ) {
            if ( $this->is_enabled() && $this->get_recipient() ) {
                $this->user_id = $user_id;
                if (class_exists('sitepress')) {
                    do_action('wpml_switch_language_for_email', $this->recipient);
                } else {
                    $this->setup_locale();
                }
                $this->send( $this->get_recipient(), $this->get_subject(), $this->get_content(), $this->get_headers(), $this->get_attachments() );
                if (class_exists('sitepress')) {
                    do_action('wpml_restore_language_from_email');
                } else {
                    $this->restore_locale();
                }
            }
        }

2 - Make sure to save a backup copy of this file in case you update your plugin as it will be overriden in every update.

Please, let me know the results, have a nice day.