Trump said in a tweet late on Tuesday that he had accepted an invitation to travel to Mexico to meet the country's president on Wednesday.