I have created a functionality to add some metaboxes to a post. I am having an issue with the boxes displayed in the image attached. My client is complaining that for some reason in any random moment the metaboxes disappear and all the information on them, like some body pressed Remove and save the post.
This is the code that I am using to save and update the metaboxes:
//Save product price
add_action('save_post', 'save_detailss');
function save_detailss($post_id){
global $post;
// to prevent metadata when the post is saved on the Quick Edit mode
if (wp_verify_nonce($_POST['_inline_edit'], 'inlineeditnonce'))
return;
// to prevent metadata or custom fields from disappearing
if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE )
return $post_id;
if (isset($_POST['more_info_data'])){
$data = $_POST['more_info_data'];
update_post_meta($post_id,'more_info_data',$data);
}else{
delete_post_meta($post_id,'more_info_data');
}
}
Thanks so much in advance!