Good night guys, I am not very familiar with Wordpress, but I am already completing my task, I can already send email, capture choice via jquery with Ajax processing email sending, but I can not capture the user logged in to Wordpress, I need a light. Thankful, Siro Souza
<html>
<body>
<meta http-equiv="refresh" content="2; url=index.php">
<?php
$location = $_SERVER['DOCUMENT_ROOT'];
include ($location . '/wp-config.php');
include ($location . '/wp-load.php');
include ($location . '/wp-includes/pluggable.php');
global $current_user;
\etorna os dados do usuário logado
$current_user = wp_get_current_user();
\\ passamos o ID do usuário e geramos o array
$user_info = get_userdata($current_user->ID);
$first_name = $user_info->first_name;
$user_email = $user_info->user_email;
if(is_user_logged_in()){
$premium = $_POST['chosen_premium'];
$vnome = $first_name;
$vemail_origem = $user_email;
$vassunto = "Prêmio Escolhido";
$vmensagem = $premium;
$msg="Nome: $vnome
";
$msg.="Email: $vemail_origem
";
$msg.="Assunto: $vassunto
";
$msg.="Mensagem: $vmensagem
";