Many sufferers of whooping cough find that eating or drinking certain things provokes a coughing spasm. I have been passed anecdotal information from ., a paediatric speech and language therapist in the UK who has suggested that some coughing spasms may be due to liquid nourishment leaking past the vocal cords into the windpipe. The theory being that whooping cough might be causing some weakness of the vocal cords (it certainly can cause voice changes). I understand that she has found that thickening liquids before drinking can help this problem. Liquids should be thickened to the consistency of syrup before drinking, using a proprietory thickening agent that can usually be obtained from a pharmacy. One such product that should be easily available is 'ThickenUp® Clear', made by Nestle.
If you suspect liquids are provoking some coughing, this is probably worth a try.
I have had a little feedback on this which has not supported its usefulness.