How can I automatically disable WiFi when I connect to an Ethernet network?
If you have somehow modified the default service ordering, you can set it again in the network tab using the gear.

This makes the Wi-Fi inactive for internet routing whenever you connect the cable. What you ask is scriptable if you know some programming, but there isn't a simple trigger to actually turn the Wi-Fi radio off at the user level of the OS.