Fatal error: Uncaught ArgumentCountError: Too few arguments to function update_post_meta(), 2 passed in C:\xampp\htdocs\wordpress\wp-content\themes\malura\functions.php on line 136 and at least 3 expected in C:\xampp\htdocs\wordpress\wp-includes\post.php:1799 Stack trace: #0 C:\xampp\htdocs\wordpress\wp-content\themes\malura\functions.php(136): update_post_meta('preco_id', '') #1 C:\xampp\htdocs\wordpress\wp-includes\class-wp-hook.php(288): salvar_meta_info_imoveis(74)
function salvar_meta_info_imoveis( $post_id ) {
if( isset($_POST['preco_id']) ) {
update_post_meta('preco_id', $_POST['preco_id']);
}
if( isset($_POST['vagas_id']) ) {
update_post_meta('vagas_id', $_POST['vagas_id']);
}
if( isset($_POST['banheiros_id']) ) {
update_post_meta('banheiros_id', $_POST['banheiros_id']);
}
if( isset($_POST['quartos_id']) ) {
update_post_meta( $post_id, 'quartos_id', $_POST['quartos_id']);
}
}
add_action('save_post', 'salvar_meta_info_imoveis');