US President-elect Donald Trump will be required to appear at a court hearing in a case involving hush money paid to a porn star.