Whooping cough

So my doctor suggested anyone who will be holding or be around the child should have a whooping cough shot have any of your doctors suggested this to you?