• protsport4991

    (@protport4991)


    Dont work get function – wp_get_current_user() or get_current_user_id(), why?

    add_action('wpcf7_mail_sent','custom_wpcf7_mail_sent_function', 10, 1);
    function custom_wpcf7_mail_sent_function($contact_form) { $current_user = wp_get_current_user();
    if ($current_user && !empty($current_user->user_email)) { error_log('Email sent successfully to: ' . $current_user->user_email); }
    }

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Action – wpcf7_mail_sent’ is closed to new replies.