Pigs are not immune to poison. They are just as susceptible to poisons as any other animal.
The idea that pigs are immune may come from their omnivorous diet—they will eat almost anything, including things poisonous to other animals. Their efficient digestive system can process a wide range of food, allowing them to tolerate some substances that might harm others, but this does not mean immunity to all poisons. Historical anecdotes about pigs surviving poison exposure are often exaggerated or lack scientific evidence.
Pigs can still get sick or die from ingesting poisonous substances.