Stop in for a cup of coffee

No it is hard wired 10/3 from under the loft to the junction box on top. That wire with the plug goes from the box to the motor, came that way!
10/4