When a person over sixteen years of age is convicted of an offense, under the law of the state or an ordinance of a municipal corporation, and the tribunal before which the conviction is had is directed by law to commit the offender to the county jail, or corporation prison, the court, mayor or justice of the peace, as the case may be, shall sentence the offender to the workhouse, if there is such house in the county: Provided, That when a commitment is made from a city, village or township in the county, other than in the municipality containing such workhouse, the council of such city or village, or the trustees of such township, shall transmit with the mittimus a sum of money equal to forty cents per day for the time of such commitment, to be placed in the hands of the superintendent of such workhouse, for the care and maintenance of such prisoner.
W. Va. Code § 7-9-16