Whooping cough is a disease of the respiratory system, caused by a bacterium known as Bordetella pertussis. It is transmitted by being in contact with virus particles, which have been released into the environment through the cough or sneeze of someone infected.
Whooping cough produces inflammation of the respiratory tract. Newborns are usually vaccinated against this disease at 2 months of age. This makes them defenseless during their first months of life, from contact with infected people.
The way that pregnant women transmit immunity to their babies is to get vaccinated against whooping cough between weeks 27 to 36 of pregnancy. In this way the antibodies are passed to the fetus, through the regular channels. In case the pregnant woman does not get vaccinated during her pregnancy, she can do it just after giving birth.
If you choose the latter option, it takes about two weeks to develop immunity against the disease. And you will transmit immunity to your baby through breast milk, that is, by breastfeeding. The vaccine is safe for both the mother and the baby, so it is recommended to do it while she is still pregnant.