D
D
DmitryShishov2018-08-06 13:57:08
WordPress
DmitryShishov, 2018-08-06 13:57:08

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

1 answer(s)
D
DmitryShishov, 2018-08-06
@DmitryShishov

Answered by KAGG Design - www.stackoverflow.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question