Custom post type does not save custom fields when moved to trash
When moving a post with custom fields to the "Trash" (Lixeira) or pressing "Quick edit" (Edição rápida) when the post’s status is "Pending review" (Revisão pendente) as in the photo below:
The information of the custom fields in the database is changed to N (
Null) and when accessing the post through the trash data is not presented.
How can I prevent data from being saved as "
Null" when it goes to the trash?