The Philippines has cancelled an Australian nun's missionary visa for engaging in political activity and has given her 30 days to leave the country.

Filipino President Rodrigo Duterte had ordered an investigation into 71-year-old Sister Patricia Fox as an "undesirable" foreigner.

Immigration Commissioner Jaime Morente said in a statement on Wednesday that the Bureau of Immigration's board of commissioners had canceled Fox's visa and ordered her to leave due to "her involvement in partisan political activities."

Fox could not be immediately be contacted for comment on Wednesday.

Fox is a coordinator of a Philippine congregation of Roman Catholic nuns called Notre Dame de Sion and has lived in the Philippines for almost 30 years.