wp_trash_post() duplicates post to trash
As the function name suggests, wp_trash_post() only trashes a post. If you want to have a post completely deleted then you can use wp_delete_post( int $postid, bool $force_delete = false ) instead. https://developer.wordpress.org/reference/functions/wp_delete_post/ When the post and page is permanently deleted, everything that is tied to it is deleted also. This includes comments, post meta … Read more