Although this hymn is attributed to Joseph Cook (1859-1933), it was published before he was born. It appears in 1843 in the book "First Truths; or Lessons and hymns for Christian children" (London: Society for Promoting Christian Knowledge) and was probably published in an earlier source. Joseph Cook quoted this text in his last speech to Parliament, which is probably where confusion originated.
Dianne Shapiro