Join our new community forum for support & discussion
Join NowHome › Support › Extensions › Messages › Changing variable after “Message from:”
Changing variable after “Message from:”
-
AuthorPosts
-
nan91 2 years ago
Hi!
I would like to ask whether it is possible to change the variable after Message from: <user name>.
We would love to use the vendors <full name>, instead of <user name>.
Is it possible to change with any code snippets?Thanks for the help!
Please let me know if you mean some specific email sent to users or some front-end template/form where this text is displayed?
nan91 2 years agoOh sorry for the late response!
It is shown in the Message plugin if you selected a message from a vendor.
You can find it in the title. Messages from %s (and it calls the user name not the full or first etc.)
Thanks for help!
Sorry, it’s not possible without editing the code directly, but it should set the user display name – you can change it for all users in HivePress/Settings/Users section.
RooninStark 1 year, 6 months agoHello ihor.
I find this treat for my question.
My need is to change it to a custom user name. I made one custom field called kullanici_adi
I can change it on the vendor tab but on users not.Is it possible to change this via code snippet?
I tried but had no chance.
Cheers
RooninUnfortunately this would require code customizations because users don’t have custom fields, these are implemented for vendor profiles. By default, you can use any of the available user fields, like
%user.username%
,%user.display_name%
.RooninStark 1 year, 6 months agoHi ihor.
Thanks for your suggestion.
I made some changes to the message plugin core. It works. I can see now the user name instead of the full name etc.I now try to put these files I changed to the my child theme folder with the following folder structure but doesn’t work. May I miss something.
/themes/taskhive-child/hivepress-messages/includes/controllers/class-message.php
/themes/taskhive-child/hivepress-messages/templates/message/thread/message-sender.php
/themes/taskhive-child/hivepress-messages/templates/message/view/message-sender.phpI got the idea for the folder structure from the following thread:
https://hivepress.io/support/topic/change-username-of-vendors/#post-17598and add code to /wp-content/themes/experthive-child/hivepress/user/login/user-login-link.php
Any clue why it not work?
thanks
Best Regards
RooninPlease try changing this part:
/hivepress-messages/templates/
to just
/hivepress/
This will work for template files, but unfortunately it’s not possible to override controllers and other components this way, this would require using some API hooks, for example if you want to override some email parameters you can use
hivepress/v1/emails/email_name_here
hook.RooninStark 1 year, 6 months agoHi ihor
thank you for your information. I’ll give a try on this.Best Regards
Roonin -
AuthorPosts
New Reply
This forum has been archived and is no longer accepting new posts or replies. Please join our new community forum for support & discussion.