Ah, yes. "Her" car
I had that argument once with my wife. New VS. used. Then I showed her the two costs. No contest. Especially after she saw the finished product!
That extra connector is for the AutoDim function. I know because the PO of my X cheaped out and put aftermarket, heated, convex mirrors on mine. After I checked the cars option list, I found it should have the AutoDim glass. I found the whole passenger assembly for $40 and got the glass for the drivers side for $10. Win, Win!
Well, good luck with the replacement.