In technical terms, it is said that the plants do not feel pain when they die. This is primarily because they do not have a nervous system much like humans do. However, this would go deep into out concepts of both consciousness and pain.
Pain is indeed linked with consciousness, and we have yet been unable to develop a proper definition of it. Who knows if plants do indeed feel pain and are conscious but in a much different way as compared to humans. However, for as long as we resort to theories based on our scientific method, plants do not feel pain in technical terms.