Public Ticket #3442066

Email for quote

Closed
Comments
6 Tickets 1
Dan Greenberg started the conversation 3 years ago on August 22, 2023 at 3:49pm

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

2,762
KingsPlugins replied 3 years ago on August 22, 2023 at 8:52pm

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://b2bkingplugin.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,762
KingsPlugins replied 3 years ago on August 23, 2023 at 11:43pm

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;
}


Sign In