Whooping cough vaccine contradictions

F
Hi ladies, just trying to suss out what the general consensus is on the necessity of everybody getting their whooping cough vaccinations before a baby is born. I don't know about other countries, but it's a big thing here in Australia.
At my last midwife appointment I was told it's best for everyone wanting contact with my baby before he is six weeks old to get immunised against whooping cough. But today at my OB appointment I was told that so long as I have it four weeks prior to birth, baby will be protected against it aswell for the first two to three months of life, so it's really not necessary to try and get all of our families and friends to get the vaccination...
Husband and our immediate families all want to get the vaccination anyway, but I'm wondering now if there's any point asking friends to have it done?