Comments 1Dan Greenberg started the conversationAugust 22, 2023 at 3:49pmHiI would like to change in the email we get after a B2B client asking for a QuoteWould like to have his NAME instead of the USERNAMEWhich template do i need to change and where do i find it in files please?Thank you 2,623WebWizards repliedAugust 22, 2023 at 8:52pmHi Dan,For that, you would need to modify the new-message-email-template.php fileThis file is found in b2bking pro/includes/emails/templates/new-message-email-template.phpI would advise to copy the template and paste it directly under your child theme, as we describe here: https://woocommerce-b2b-plugin.com/docs/how-to-customize-b2bking-emails/#1-toc-title - then you can edit the template under the child theme.This way you would not lose changes when you update the plugin.Kind regards,Stefan 2,623WebWizards repliedAugust 22, 2023 at 8:55pmYou would need to change line 63 here:The variable $user_login contains the username. 1Dan Greenberg repliedAugust 23, 2023 at 7:05amHiBut to which parameter do i need to change in order to show the Name instead of the Username:https://prnt.sc/B9Xh3ABp38lRhttps://prnt.sc/g6lgRzzZ_J_eThank you 2,623WebWizards repliedAugust 23, 2023 at 11:43pmYou could replace line 63 there with the following: $user = get_user_by('login', $user_login); if ($user){ echo $user->first_name.' '.$user->last_name; // another option is echo $user->display_name; } Sign in to reply ...
Hi
I would like to change in the email we get after a B2B client asking for a Quote
Would like to have his NAME instead of the USERNAME
Which template do i need to change and where do i find it in files please?
Thank you
Hi Dan,
For that, you would need to modify the new-message-email-template.php file
This file is found in b2bking pro/includes/emails/templates/new-message-email-template.php
I would advise to copy the template and paste it directly under your child theme, as we describe here: https://woocommerce-b2b-plugin.com/docs/how-to-customize-b2bking-emails/#1-toc-title - then you can edit the template under the child theme.
This way you would not lose changes when you update the plugin.
Kind regards,
Stefan
You would need to change line 63 here:
The variable $user_login contains the username.
Hi
But to which parameter do i need to change in order to show the Name instead of the Username:
https://prnt.sc/B9Xh3ABp38lR
https://prnt.sc/g6lgRzzZ_J_e
Thank you
You could replace line 63 there with the following:
$user = get_user_by('login', $user_login); if ($user){ echo $user->first_name.' '.$user->last_name; // another option is echo $user->display_name; }