In this paper, we consider a pressure-driven flow of a viscoelastic fluid in a straight rectangular channel undergoing a solidification phase change due to polymerization. We treat the viscoelastic response of the fluid with a model based on the formalism of variable-order calculus; more specifically, we employ a model utilizing a variable-order Caputo-type differential operator. The order parameter present in the model is determined by the extent of polymerization induced by light irradiation. We model this physical quantity with a simple equation of kinetics, where the reaction rate is proportional to the amount of material available for polymerization and optical transmittance. We treat cases when the extent of polymerization is a function of either time alone or both position and time, and solve them using either analytical or semi-analytical methods. Results of our analysis indicate that in both cases, solutions evolve in time according to a variable-order decay law, with the solution in the first case having a hyperbolic cosine-like spatial dependence, while the spatial dependence in the second case conforms to a bell curve-like function. We infer that our treatment is physically sound and may be used to consider problems of more general viscoelastic flows during solidification, with the advantage of requiring fewer experimentally determined parameters.