Skip Navigation

[Resolved] User first name not inserted correctly in translated User Forms notifications

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by simonM-5 3 years, 7 months ago.

Author
Posts
#2084435

Hi Support

We have users who can register from the front end as either Nannies or Families.

When the user notification welcome mail is sent out, it works fine in English (primary language), however if a user registers from the German version of the site, the user name is not being inserted correctly into the notification.

I'm not sure if this is a Toolset Forms notification issue or a WPML String translation issue.

To reproduce this, feel free to just sign up as a Nanny (Become a Native Nanny in menu) or as a Family (Sign Up) using the English and German versions to compare. Your welcome email will contain "Hi (user first name)" correctly in English and "Hallo ," in German, which should be "Hallo (user first name),".

I have tried using both [wpv-user field="user_firstname"] and [wpv-current-user info="firstname"] in both the EN and DE versions of the notification.

Thanks and regards
Simon

#2084677

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Simon

I tested this on my own WPML test site and it worked, but when I added the shortcode for the first name in the notification I included the id attribute to ensure the correct user is found, like so:

Hello [wpv-user field="user_firstname" id="%%USER_USERID%%"]

It is normally only necessary to add that attribute for deferred messages (i.e. sent later than when the form is submitted), but it's good practice to use it all the time, which I did instinctively.

Could you test updating your form notification in the same way. You may need to translate the form again.

#2088047

HI Nigel

Thanks for that tip with the

id="%%USER_USERID%%"

. I can confirm that it is working now.

Kind regards
Simon