In the early 1900's, smallpox was a dangerous disease. Fortunately, a vaccine existed. The vaccine was rather primitive, and, like today, many people believed for various reasons that it was better to not take the vaccine.
In the late 1800's, the LDS church's stance on vaccines for smallpox was unclear. Charles W. Penrose, editor of the Deseret News at the time, took a vocal stand against the vaccine, placing his faith entirely on priesthood blessings instead. He later became a member of the Quorum of the Twelve, replacing Abraham O. Woodruff. Woodruff also refused to become vaccinated. He was made a member of the Twelve at the age of twenty-three, and died less than eight years later, in Mexico. Cause of death? Both he and his wife died of smallpox. Had Woodruff been vaccinated, there is a very good chance he would have become the president of the church. His suspicion of medicine, and his over-reliance on faith, resulted in his early death and changed the course of church history. Had he lived as long as Penrose lived, for example, he would have been prophet from 1945 to 1965--twenty years. George Albert Smith would never have been prophet. David O. McKay would have been the prophet for only five years instead of nineteen.
Joseph F. Smith noted in 1910 in the Improvement Era (the church magazine at the time) that his guardians had vaccinated him against small pox as a child, and "I am as satisfied as I can be that had it not been for vaccination, I would have had the disease in very bad form. I believe that our elders ought to be vaccinated. Now, I know that this will not be in accordance with some people's views. We receive word that many of our elders, who have failed to attend to this matter, are exposed to the disease and become affected with it; and recently a number of them have had to be taken to the pest-houses to be cared for."
By 1926 (and perhaps earlier) it was standard for LDS missionaries to be vaccinated for smallpox.
In fact, around that time the church supported compulsory (forced) vaccinations for smallpox. Utah, however, still refused to make a compulsory vaccination law until 1931, when they were forced to do so by the federal government.
I'm having difficulty tracking down a date for when the church officially started supporting compulsory smallpox vaccinations. If anyone can find more details, let me know. I should point out that Joseph F. Smith became the president of the church in 1901, but I am not certain when his views about vaccination were first publicized. I therefore do not know if Woodruff was ignoring advice from his superiors when he refused to receive the vaccination.