Lid Switch Compatability

I have a GE Profile washer and want to replace the top panel and lid (all rusted out). I see that the lid switch cut-out on the new top is a different set up for one using a magnet like on model WHDSR315DAWW. If I replace the current mechanical switch set up with the magnetic one, will it plug into the current set up and function correctly?