The question isn’t just whether Joseph Smith was a prophet, but whether Wilford Woodruff was also a prophet:
" . . . the United States Congress, beginning in 1862, enacted a series of laws against polygamy that became increasingly harsh. By the 1880s many Latter-day Saint men were imprisoned or went into hiding. In 1889 in the face of increasing hardships and the threat of government confiscation of Church property, including temples, Wilford Woodruff, President of the Church at the time, prayed for guidance. He was inspired to issue a document that officially ended the sanction of plural marriage by the Church."
lds.org/ldsorg/v/index.jsp?locale=0&sourceId=9887ec6f164b2110VgnVCM100000176f620a____&vgnextoid=bbd508f54922d010VgnVCM1000004d82620aRCRD
So the ending of polygamy was also by revelation, making it a violation of both church law (everywhere) and secular law (providing the place a person resides in has such legislation).
“More than a century ago God clearly revealed unto His prophet Wilford Woodruff that the practice of plural marriage should be discontinued, which means that it is now against the law of God. Even in countries where civil or religious law allows polygamy, the Church teaches that marriage must be monogamous and does not accept into its membership those practicing plural marriage.”
lds.org/ensign/1998/11/what-are-people-asking-about-us