Answer the question
In order to leave comments, you need to log in
How can I put the user's name in the subject field of the email?
When changing user data in WooCommerce, an email is sent to the administrator.
How can I put the user's full name in the subject field "$ subject" of the letter? Here is part of the code:
function woocommerce_send_notification(){
$body = '';
$to = '[email protected]';
$subject = 'Смена данных Имя Фамилия';
$curr_user = wp_get_current_user();
$user_id = $curr_user->ID;
$curr_username = $curr_user->data->user_login;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question