Problem with accents when inserting a personified field in the wordpress panel

0

Hello friends when I put there "Hemerson Assuncao" sends more when I put with characters acetos type Asuncion does not send example

add_post_meta ($ id, 'full_name', 'Hemerson Assumption');

Someone with this strength follows my complete code below

<?php
require_once 'wp-load.php';
require_once ABSPATH . 'wp-admin/includes/taxonomy.php';



// Cria o post
$id = wp_insert_post(array(
    'post_title'    => 'Pedido de Gas',
        'post_content'  => $pedido,
       // 'post_date'     => date('Y-m-d H:i:s'),
       // 'post_author'   => $user_id,
        'post_type'     => 'pedidos',
        'post_status'   => 'publish',
));
if ($id) {
    // criacao de categoria
   wp_set_post_terms($id, wp_create_category('gas'), 'category');
    // Campos Pesonalizados
   add_post_meta($id, 'nome_completo','Hemerson Assunção');
   add_post_meta($id, 'endereco',$endereco);
   add_post_meta($id, 'numero',$numero);
   add_post_meta($id, 'bairro',$bairro);
   add_post_meta($id, 'contato',$contato);
   add_post_meta($id, 'troco',$troco);
   add_post_meta($id, 'total',$total);


} else {
    echo "WARNING: Failed to insert post into WordPress\n";
}



?>
    
asked by anonymous 05.01.2017 / 20:43

1 answer

1

It does this: $nome_completo = utf8_encode($_POST['nome_completo']);

    
05.01.2017 / 22:02